CVSROOT: /cvsroot/freetype Module name: freetype2 Changes by: Werner LEMBERG <wl> 06/06/06 12:54:08
Modified files: . : ChangeLog src/cff : cffcmap.c src/psaux : t1cmap.c Log message: formatting CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/freetype2/ChangeLog?cvsroot=freetype&r1=1.1345&r2=1.1346 http://cvs.savannah.gnu.org/viewcvs/freetype2/src/cff/cffcmap.c?cvsroot=freetype&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/freetype2/src/psaux/t1cmap.c?cvsroot=freetype&r1=1.18&r2=1.19 Patches: Index: ChangeLog =================================================================== RCS file: /cvsroot/freetype/freetype2/ChangeLog,v retrieving revision 1.1345 retrieving revision 1.1346 diff -u -b -r1.1345 -r1.1346 --- ChangeLog 6 Jun 2006 08:14:14 -0000 1.1345 +++ ChangeLog 6 Jun 2006 12:54:08 -0000 1.1346 @@ -1,11 +1,26 @@ 2006-06-06 David Turner <[EMAIL PROTECTED]> - * include/freetype/internal/services/svpscmap.h, src/cff/cffcmap.c, - src/psaux/t1cmap.c, src/psnames/psmodule.c: Fix for the memory - leak described in bug #16759. + Fix memory leak described in Savannah bug #16759. - We change 'ps_unicodes_init' so that it also takes a 'free_glyph_name' - callback to release the glyph names returned by 'get_glyph_name' + We change `ps_unicodes_init' so that it also takes a + `free_glyph_name' callback to release the glyph names returned by + `get_glyph_name' + + * include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc): + Renamed to ... + (PS_GetGlyphNameFunc): This. + (PS_FreeGlyphNameFunc): New typedef. + (PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc. + + * src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first + argument. + (cff_sid_free_glyph_name): New function. + (cff_cmap_unicode_init): Updated. + + * src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated. + + * src/psnames/psmodule.c (ps_unicodes_init): Add variable for + PS_FreeGlyphNameFunc and use it. 2006-06-04 David Turner <[EMAIL PROTECTED]> @@ -228,7 +243,7 @@ Updated. * builds/unix/install-sh: Updated from `texinfo' CVS module at - Savannah.gnu.org. + savannah.gnu.org. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. @@ -1513,7 +1528,7 @@ 2006-01-22 Werner Lemberg <[EMAIL PROTECTED]> * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from - `texinfo' CVS module at Savannah.gnu.org. + `texinfo' CVS module at savannah.gnu.org. 2006-01-21 Werner Lemberg <[EMAIL PROTECTED]> Index: src/cff/cffcmap.c =================================================================== RCS file: /cvsroot/freetype/freetype2/src/cff/cffcmap.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- src/cff/cffcmap.c 6 Jun 2006 08:14:14 -0000 1.16 +++ src/cff/cffcmap.c 6 Jun 2006 12:54:08 -0000 1.17 @@ -123,7 +123,7 @@ cff_sid_to_glyph_name( TT_Face face, FT_UInt idx ) { - CFF_Font cff = (CFF_Font) face->extra.data; + CFF_Font cff = (CFF_Font)face->extra.data; CFF_Charset charset = &cff->charset; FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames; FT_UInt sid = charset->sids[idx]; @@ -132,12 +132,14 @@ return cff_index_get_sid_string( &cff->string_index, sid, psnames ); } + FT_CALLBACK_DEF( void ) cff_sid_free_glyph_name( TT_Face face, const char* gname ) { FT_Memory memory = FT_FACE_MEMORY( face ); + FT_FREE( gname ); } @@ -159,8 +161,8 @@ return psnames->unicodes_init( memory, unicodes, cff->num_glyphs, - (PS_GetGlyphNameFunc) &cff_sid_to_glyph_name, - (PS_FreeGlyphNameFunc) &cff_sid_free_glyph_name, + (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name, + (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name, (FT_Pointer)cff ); } Index: src/psaux/t1cmap.c =================================================================== RCS file: /cvsroot/freetype/freetype2/src/psaux/t1cmap.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- src/psaux/t1cmap.c 6 Jun 2006 08:14:14 -0000 1.18 +++ src/psaux/t1cmap.c 6 Jun 2006 12:54:08 -0000 1.19 @@ -276,8 +276,8 @@ return psnames->unicodes_init( memory, unicodes, face->type1.num_glyphs, - (PS_GetGlyphNameFunc) &t1_get_glyph_name, - (PS_FreeGlyphNameFunc) NULL, + (PS_GetGlyphNameFunc)&t1_get_glyph_name, + (PS_FreeGlyphNameFunc)NULL, (FT_Pointer)face ); } _______________________________________________ Freetype-cvs mailing list Freetype-cvs@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-cvs