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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
diff --git a/ChangeLog b/ChangeLog
index 8c048c2..ad9c3eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2019-04-06 Antony Lee <anntzer.lee@gmail.com>
+
+ 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 <prince.cherusker@gmail.com>
[cff] Fix boundary checks.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 829f249..f758ea1 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 f3a41b3..0578dd8 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 ca8edf0..0949621 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 3f8619d..e301f8f 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 bbd5c40..2324989 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 c467ff4..8149555 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 8625db5..557733d 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 6d4e7a0..09ad632 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;