- minor reformatting of "ftmodule.h" - added missing "const" statements in the source code in order to really get rid of writable static variables
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
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 1e448bd..0bf332a 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -53,9 +53,9 @@
/* FreeType error code. 0 means sucess. */
/* */
FT_EXPORT_DEF( FT_Error ) FT_Outline_Decompose(
- FT_Outline* outline,
- FT_Outline_Funcs* interface,
- void* user );
+ FT_Outline* outline,
+ const FT_Outline_Funcs* interface,
+ void* user );
/*************************************************************************/
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index ed060d5..b5a4abe 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -65,8 +65,8 @@
#define FT_USE_MODULE( x ) (const FT_Module_Class*)&x,
static
-const FT_Module_Class* ft_default_modules[] =
- {
+const FT_Module_Class* const ft_default_modules[] =
+const {
#include <freetype/config/ftmodule.h>
0
};
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 20292d0..d983f6c 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -66,9 +66,9 @@
/* FreeType error code. 0 means sucess. */
/* */
FT_EXPORT_FUNC( FT_Error ) FT_Outline_Decompose(
- FT_Outline* outline,
- FT_Outline_Funcs* interface,
- void* user )
+ FT_Outline* outline,
+ const FT_Outline_Funcs* interface,
+ void* user )
{
#undef SCALED
#define SCALED( x ) ( ( (x) << shift ) - delta )
diff --git a/src/raster1/ftraster.c b/src/raster1/ftraster.c
index 2f300c4..3db811b 100644
--- a/src/raster1/ftraster.c
+++ b/src/raster1/ftraster.c
@@ -3281,7 +3281,7 @@
}
- FT_Raster_Funcs ft_standard_raster =
+ const FT_Raster_Funcs ft_standard_raster =
{
ft_glyph_format_outline,
(FT_Raster_New_Func) ft_black_new,
diff --git a/src/raster1/ftraster.h b/src/raster1/ftraster.h
index 5c7faae..36fa51c 100644
--- a/src/raster1/ftraster.h
+++ b/src/raster1/ftraster.h
@@ -37,7 +37,7 @@
#define FT_EXPORT_VAR( x ) extern x
#endif
- FT_EXPORT_VAR( FT_Raster_Funcs ) ft_standard_raster;
+ FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_standard_raster;
#ifdef __cplusplus
}
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 5a793ef..6b67705 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1486,9 +1486,9 @@
/* Error code. 0 means sucess. */
/* */
static
- int FT_Outline_Decompose( FT_Outline* outline,
- FT_Outline_Funcs* interface,
- void* user )
+ int FT_Outline_Decompose( FT_Outline* outline,
+ const FT_Outline_Funcs* interface,
+ void* user )
{
#undef SCALED
#define SCALED( x ) ( ( (x) << shift ) - delta )
@@ -1699,7 +1699,7 @@
int grays_convert_glyph( RAS_ARG_ FT_Outline* outline )
{
static
- FT_Outline_Funcs interface =
+ const FT_Outline_Funcs interface =
{
(FT_Outline_MoveTo_Func) Move_To,
(FT_Outline_LineTo_Func) Line_To,
@@ -1958,7 +1958,7 @@
}
- FT_Raster_Funcs ft_grays_raster =
+ const FT_Raster_Funcs ft_grays_raster =
{
ft_glyph_format_outline,
diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h
index 2423a0e..7b0956d 100644
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -40,7 +40,7 @@
#define FT_EXPORT_VAR( x ) extern x
#endif
- FT_EXPORT_VAR( FT_Raster_Funcs ) ft_grays_raster;
+ FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_grays_raster;
#ifdef __cplusplus
}