diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pango/pangoft2.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2006-03-31 Behdad Esfahbod <behdad@gnome.org> + * pango/pangoft2.c (_pango_ft2_ft_strerror): Change char* to + char[] in the ft error table, to avoid relocations. + +2006-03-31 Behdad Esfahbod <behdad@gnome.org> + Part of Bug 336026 – Make fallback shaper in modules work Patch from Denis Jacquerye. diff --git a/pango/pangoft2.c b/pango/pangoft2.c index 78a6096b..35960a43 100644 --- a/pango/pangoft2.c +++ b/pango/pangoft2.c @@ -493,7 +493,7 @@ pango_ft2_get_unknown_glyph (PangoFont *font) typedef struct { FT_Error code; - const char* msg; + const char msg[40]; } ft_error_description; static int @@ -509,7 +509,7 @@ _pango_ft2_ft_strerror (FT_Error error) #undef __FTERRORS_H__ #define FT_ERRORDEF( e, v, s ) { e, s }, #define FT_ERROR_START_LIST { -#define FT_ERROR_END_LIST { 0, 0 } }; +#define FT_ERROR_END_LIST }; static const ft_error_description ft_errors[] = #include FT_ERRORS_H @@ -519,7 +519,7 @@ _pango_ft2_ft_strerror (FT_Error error) #undef FT_ERROR_END_LIST ft_error_description *found = - bsearch (&error, ft_errors, G_N_ELEMENTS (ft_errors) - 1, + bsearch (&error, ft_errors, G_N_ELEMENTS (ft_errors), sizeof (ft_errors[0]), ft_error_compare); if (found != NULL) return found->msg; |