From 3ad1c93ac1b111b76dc671181b1deab252cc1f1e Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sat, 6 Apr 2019 06:37:42 +0200 Subject: [PATCH] Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'. * include/freetype/freetype.h (FT_Get_Name_Index), include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), include/freetype/internal/services/svgldict.h (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), src/type42/t42drivr.c (t42_get_name_index): Add `const' to second argument. --- ChangeLog | 13 +++++++++++++ include/freetype/freetype.h | 4 ++-- include/freetype/internal/ftobjs.h | 4 ++-- include/freetype/internal/services/svgldict.h | 4 ++-- src/base/ftobjs.c | 4 ++-- src/cff/cffdrivr.c | 4 ++-- src/sfnt/sfdriver.c | 4 ++-- src/type1/t1driver.c | 4 ++-- src/type42/t42drivr.c | 4 ++-- 9 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c048c28b..ad9c3ebc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2019-04-06 Antony Lee + + Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'. + + * include/freetype/freetype.h (FT_Get_Name_Index), + include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), + include/freetype/internal/services/svgldict.h + (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), + src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c + (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), + src/type42/t42drivr.c (t42_get_name_index): Add `const' to second + argument. + 2019-03-31 Armin Hasitzka [cff] Fix boundary checks. diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 829f24901..f758ea1c4 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -3932,8 +3932,8 @@ FT_BEGIN_HEADER * The glyph index. 0~means 'undefined character code'. */ FT_EXPORT( FT_UInt ) - FT_Get_Name_Index( FT_Face face, - FT_String* glyph_name ); + FT_Get_Name_Index( FT_Face face, + const FT_String* glyph_name ); /************************************************************************** diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index f3a41b35a..0578dd8c3 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -941,8 +941,8 @@ FT_BEGIN_HEADER FT_UInt buffer_max ); typedef FT_UInt - (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, - FT_String* glyph_name ); + (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, + const FT_String* glyph_name ); #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM diff --git a/include/freetype/internal/services/svgldict.h b/include/freetype/internal/services/svgldict.h index ca8edf0eb..094962183 100644 --- a/include/freetype/internal/services/svgldict.h +++ b/include/freetype/internal/services/svgldict.h @@ -41,8 +41,8 @@ FT_BEGIN_HEADER FT_UInt buffer_max ); typedef FT_UInt - (*FT_GlyphDict_NameIndexFunc)( FT_Face face, - FT_String* glyph_name ); + (*FT_GlyphDict_NameIndexFunc)( FT_Face face, + const FT_String* glyph_name ); FT_DEFINE_SERVICE( GlyphDict ) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 3f8619d3b..e301f8f11 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4059,8 +4059,8 @@ /* documentation is in freetype.h */ FT_EXPORT_DEF( FT_UInt ) - FT_Get_Name_Index( FT_Face face, - FT_String* glyph_name ) + FT_Get_Name_Index( FT_Face face, + const FT_String* glyph_name ) { FT_UInt result = 0; diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index bbd5c4032..232498981 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -381,8 +381,8 @@ static FT_UInt - cff_get_name_index( CFF_Face face, - FT_String* glyph_name ) + cff_get_name_index( CFF_Face face, + const FT_String* glyph_name ) { CFF_Font cff; CFF_Charset charset; diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index c467ff4d3..814955529 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -182,8 +182,8 @@ static FT_UInt - sfnt_get_name_index( FT_Face face, - FT_String* glyph_name ) + sfnt_get_name_index( FT_Face face, + const FT_String* glyph_name ) { TT_Face ttface = (TT_Face)face; diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c index 8625db5b0..557733da3 100644 --- a/src/type1/t1driver.c +++ b/src/type1/t1driver.c @@ -70,8 +70,8 @@ static FT_UInt - t1_get_name_index( T1_Face face, - FT_String* glyph_name ) + t1_get_name_index( T1_Face face, + const FT_String* glyph_name ) { FT_Int i; diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c index 6d4e7a095..09ad632e9 100644 --- a/src/type42/t42drivr.c +++ b/src/type42/t42drivr.c @@ -69,8 +69,8 @@ static FT_UInt - t42_get_name_index( T42_Face face, - FT_String* glyph_name ) + t42_get_name_index( T42_Face face, + const FT_String* glyph_name ) { FT_Int i;