diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-06-12 00:38:13 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-06-12 00:38:13 +0000 |
commit | 4b9a95cf71f5c9cf45159899cc9674fcc248fb83 (patch) | |
tree | a597e6005547e5ac1cffafa83c1c0f284f6bc9cf /pango | |
parent | 19290cba0704aec45d7cceb81c283f80a79db933 (diff) | |
download | pango-4b9a95cf71f5c9cf45159899cc9674fcc248fb83.tar.gz |
Add G_GNUC_CONST and G_GNUC_PURE annotations.
2007-06-11 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-attributes.h:
* pango/pango-font.h:
* pango/pango-glyph.h:
* pango/pango-gravity.h:
* pango/pango-language.h:
* pango/pango-layout.h:
* pango/pango-matrix.h:
* pango/pango-ot-private.h:
* pango/pango-ot.h:
* pango/pango-renderer.h:
* pango/pango-script.h:
* pango/pango-tabs.h:
* pango/pango-utils.h:
* pango/pangoatsui-private.h:
* pango/pangocairo-atsui.h:
* pango/pangocairo-atsuifont.h:
* pango/pangocairo-fc.h:
* pango/pangocairo-private.h:
* pango/pangocairo-win32.h:
* pango/pangocairo.h:
* pango/pangofc-decoder.h:
* pango/pangofc-font.h:
* pango/pangofc-fontmap.h:
* pango/pangoft2-private.h:
* pango/pangoft2.h:
* pango/pangowin32-private.h:
* pango/pangox-private.h:
* pango/pangoxft-render.h:
* pango/pangoxft.h:
Add G_GNUC_CONST and G_GNUC_PURE annotations.
svn path=/trunk/; revision=2345
Diffstat (limited to 'pango')
30 files changed, 81 insertions, 80 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index 50c7dd24..98ee9868 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -181,7 +181,7 @@ PangoAttrType pango_attr_type_register (const gchar *name); PangoAttribute * pango_attribute_copy (const PangoAttribute *attr); void pango_attribute_destroy (PangoAttribute *attr); gboolean pango_attribute_equal (const PangoAttribute *attr1, - const PangoAttribute *attr2); + const PangoAttribute *attr2) G_GNUC_PURE; PangoAttribute *pango_attr_language_new (PangoLanguage *language); PangoAttribute *pango_attr_family_new (const char *family); diff --git a/pango/pango-font.h b/pango/pango-font.h index 79758ae4..0411fb02 100644 --- a/pango/pango-font.h +++ b/pango/pango-font.h @@ -98,13 +98,13 @@ typedef enum { #define PANGO_TYPE_FONT_DESCRIPTION (pango_font_description_get_type ()) -GType pango_font_description_get_type (void); +GType pango_font_description_get_type (void) G_GNUC_CONST; PangoFontDescription *pango_font_description_new (void); PangoFontDescription *pango_font_description_copy (const PangoFontDescription *desc); PangoFontDescription *pango_font_description_copy_static (const PangoFontDescription *desc); -guint pango_font_description_hash (const PangoFontDescription *desc); +guint pango_font_description_hash (const PangoFontDescription *desc) G_GNUC_PURE; gboolean pango_font_description_equal (const PangoFontDescription *desc1, - const PangoFontDescription *desc2); + const PangoFontDescription *desc2) G_GNUC_PURE; void pango_font_description_free (PangoFontDescription *desc); void pango_font_descriptions_free (PangoFontDescription **descs, int n_descs); @@ -113,30 +113,30 @@ void pango_font_description_set_family (PangoFontDescript const char *family); void pango_font_description_set_family_static (PangoFontDescription *desc, const char *family); -G_CONST_RETURN char *pango_font_description_get_family (const PangoFontDescription *desc); +G_CONST_RETURN char *pango_font_description_get_family (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_style (PangoFontDescription *desc, PangoStyle style); -PangoStyle pango_font_description_get_style (const PangoFontDescription *desc); +PangoStyle pango_font_description_get_style (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_variant (PangoFontDescription *desc, PangoVariant variant); -PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc); +PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_weight (PangoFontDescription *desc, PangoWeight weight); -PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc); +PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_stretch (PangoFontDescription *desc, PangoStretch stretch); -PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc); +PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_size (PangoFontDescription *desc, gint size); -gint pango_font_description_get_size (const PangoFontDescription *desc); +gint pango_font_description_get_size (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_absolute_size (PangoFontDescription *desc, double size); -gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc); +gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_set_gravity (PangoFontDescription *desc, PangoGravity gravity); -PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc); +PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc) G_GNUC_PURE; -PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc); +PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc) G_GNUC_PURE; void pango_font_description_unset_fields (PangoFontDescription *desc, PangoFontMask to_unset); @@ -149,7 +149,7 @@ void pango_font_description_merge_static (PangoFontDescription *desc, gboolean pango_font_description_better_match (const PangoFontDescription *desc, const PangoFontDescription *old_match, - const PangoFontDescription *new_match); + const PangoFontDescription *new_match) G_GNUC_PURE; PangoFontDescription *pango_font_description_from_string (const char *str); char * pango_font_description_to_string (const PangoFontDescription *desc); @@ -160,17 +160,17 @@ char * pango_font_description_to_filename (const PangoFontDescrip */ #define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ()) -GType pango_font_metrics_get_type (void); +GType pango_font_metrics_get_type (void) G_GNUC_CONST; PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics); void pango_font_metrics_unref (PangoFontMetrics *metrics); -int pango_font_metrics_get_ascent (PangoFontMetrics *metrics); -int pango_font_metrics_get_descent (PangoFontMetrics *metrics); -int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics); -int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics); -int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics); -int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics); -int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics); -int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics); +int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_descent (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) G_GNUC_PURE; +int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; #ifdef PANGO_ENABLE_BACKEND @@ -208,8 +208,8 @@ GType pango_font_family_get_type (void) G_GNUC_CONST; void pango_font_family_list_faces (PangoFontFamily *family, PangoFontFace ***faces, int *n_faces); -G_CONST_RETURN char *pango_font_family_get_name (PangoFontFamily *family); -gboolean pango_font_family_is_monospace (PangoFontFamily *family); +G_CONST_RETURN char *pango_font_family_get_name (PangoFontFamily *family) G_GNUC_PURE; +gboolean pango_font_family_is_monospace (PangoFontFamily *family) G_GNUC_PURE; #ifdef PANGO_ENABLE_BACKEND @@ -257,11 +257,11 @@ struct _PangoFontFamilyClass GType pango_font_face_get_type (void) G_GNUC_CONST; PangoFontDescription *pango_font_face_describe (PangoFontFace *face); -G_CONST_RETURN char *pango_font_face_get_face_name (PangoFontFace *face); +G_CONST_RETURN char *pango_font_face_get_face_name (PangoFontFace *face) G_GNUC_PURE; void pango_font_face_list_sizes (PangoFontFace *face, int **sizes, int *n_sizes); -gboolean pango_font_face_is_synthesized (PangoFontFace *face); +gboolean pango_font_face_is_synthesized (PangoFontFace *face) G_GNUC_PURE; #ifdef PANGO_ENABLE_BACKEND diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h index 3fb6d94e..cd26f53c 100644 --- a/pango/pango-glyph.h +++ b/pango/pango-glyph.h @@ -84,14 +84,14 @@ struct _PangoGlyphString { PangoGlyphString *pango_glyph_string_new (void); void pango_glyph_string_set_size (PangoGlyphString *string, gint new_len); -GType pango_glyph_string_get_type (void); +GType pango_glyph_string_get_type (void) G_GNUC_CONST; PangoGlyphString *pango_glyph_string_copy (PangoGlyphString *string); void pango_glyph_string_free (PangoGlyphString *string); void pango_glyph_string_extents (PangoGlyphString *glyphs, PangoFont *font, PangoRectangle *ink_rect, PangoRectangle *logical_rect); -int pango_glyph_string_get_width(PangoGlyphString *glyphs); +int pango_glyph_string_get_width(PangoGlyphString *glyphs) G_GNUC_PURE; void pango_glyph_string_extents_range (PangoGlyphString *glyphs, int start, diff --git a/pango/pango-gravity.h b/pango/pango-gravity.h index cee1ab03..2e42ebd8 100644 --- a/pango/pango-gravity.h +++ b/pango/pango-gravity.h @@ -98,7 +98,7 @@ typedef enum { #include <pango/pango-script.h> double pango_gravity_to_rotation (PangoGravity gravity) G_GNUC_CONST; -PangoGravity pango_gravity_get_for_matrix (const PangoMatrix *matrix); +PangoGravity pango_gravity_get_for_matrix (const PangoMatrix *matrix) G_GNUC_PURE; PangoGravity pango_gravity_get_for_script (PangoScript script, PangoGravity base_gravity, PangoGravityHint hint) G_GNUC_CONST; diff --git a/pango/pango-language.c b/pango/pango-language.c index a74f666d..61124bd0 100644 --- a/pango/pango-language.c +++ b/pango/pango-language.c @@ -193,13 +193,14 @@ _pango_get_lc_ctype (void) PangoLanguage * pango_language_get_default (void) { - gchar *lang; - PangoLanguage *result; - - lang = _pango_get_lc_ctype (); + static PangoLanguage *result = NULL; - result = pango_language_from_string (lang); - g_free (lang); + if (G_UNLIKELY (!result)) + { + gchar *lang = _pango_get_lc_ctype (); + result = pango_language_from_string (lang); + g_free (lang); + } return result; } diff --git a/pango/pango-language.h b/pango/pango-language.h index afd50452..9c1a9d8d 100644 --- a/pango/pango-language.h +++ b/pango/pango-language.h @@ -32,16 +32,16 @@ typedef struct _PangoLanguage PangoLanguage; #define PANGO_TYPE_LANGUAGE (pango_language_get_type ()) -GType pango_language_get_type (void); +GType pango_language_get_type (void) G_GNUC_CONST; PangoLanguage *pango_language_from_string (const char *language); #define pango_language_to_string(language) ((const char *)language) -G_CONST_RETURN char *pango_language_get_sample_string (PangoLanguage *language); -PangoLanguage *pango_language_get_default (void); +G_CONST_RETURN char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST; +PangoLanguage *pango_language_get_default (void) G_GNUC_CONST; gboolean pango_language_matches (PangoLanguage *language, - const char *range_list); + const char *range_list) G_GNUC_PURE; G_END_DECLS diff --git a/pango/pango-layout.h b/pango/pango-layout.h index ff8389eb..d84b1f79 100644 --- a/pango/pango-layout.h +++ b/pango/pango-layout.h @@ -241,7 +241,7 @@ typedef struct _PangoLayoutIter PangoLayoutIter; #define PANGO_TYPE_LAYOUT_ITER (pango_layout_iter_get_type ()) -GType pango_layout_iter_get_type (void); +GType pango_layout_iter_get_type (void) G_GNUC_CONST; PangoLayoutIter *pango_layout_get_iter (PangoLayout *layout); void pango_layout_iter_free (PangoLayoutIter *iter); diff --git a/pango/pango-matrix.h b/pango/pango-matrix.h index 3ad5e9ff..5909367d 100644 --- a/pango/pango-matrix.h +++ b/pango/pango-matrix.h @@ -84,7 +84,7 @@ struct _PangoMatrix /* for PangoRectangle */ #include <pango/pango-types.h> -GType pango_matrix_get_type (void); +GType pango_matrix_get_type (void) G_GNUC_CONST; PangoMatrix *pango_matrix_copy (const PangoMatrix *matrix); void pango_matrix_free (PangoMatrix *matrix); @@ -109,7 +109,7 @@ void pango_matrix_transform_rectangle (const PangoMatrix *matrix, PangoRectangle *rect); void pango_matrix_transform_pixel_rectangle (const PangoMatrix *matrix, PangoRectangle *rect); -double pango_matrix_get_font_scale_factor (const PangoMatrix *matrix); +double pango_matrix_get_font_scale_factor (const PangoMatrix *matrix) G_GNUC_PURE; G_END_DECLS diff --git a/pango/pango-ot-private.h b/pango/pango-ot-private.h index 3705ae8e..88875e74 100644 --- a/pango/pango-ot-private.h +++ b/pango/pango-ot-private.h @@ -92,13 +92,13 @@ struct _PangoOTBuffer guint applied_gpos : 1; }; -GType pango_ot_info_get_type (void); +GType pango_ot_info_get_type (void) G_GNUC_CONST; HB_GDEF pango_ot_info_get_gdef (PangoOTInfo *info); HB_GSUB pango_ot_info_get_gsub (PangoOTInfo *info); HB_GPOS pango_ot_info_get_gpos (PangoOTInfo *info); -GType pango_ot_ruleset_get_type (void); +GType pango_ot_ruleset_get_type (void) G_GNUC_CONST; G_END_DECLS diff --git a/pango/pango-ot.h b/pango/pango-ot.h index 52cc30f0..1b3b8b7e 100644 --- a/pango/pango-ot.h +++ b/pango/pango-ot.h @@ -166,14 +166,14 @@ void pango_ot_ruleset_substitute (const PangoOTRuleset *ruleset, PangoOTBuffer *buffer); void pango_ot_ruleset_position (const PangoOTRuleset *ruleset, PangoOTBuffer *buffer); -PangoScript pango_ot_tag_to_script (PangoOTTag script_tag); -PangoOTTag pango_ot_tag_from_script (PangoScript script); -PangoLanguage* pango_ot_tag_to_language (PangoOTTag language_tag); -PangoOTTag pango_ot_tag_from_language (PangoLanguage *language); +PangoScript pango_ot_tag_to_script (PangoOTTag script_tag) G_GNUC_CONST; +PangoOTTag pango_ot_tag_from_script (PangoScript script) G_GNUC_CONST; +PangoLanguage *pango_ot_tag_to_language (PangoOTTag language_tag) G_GNUC_CONST; +PangoOTTag pango_ot_tag_from_language (PangoLanguage *language) G_GNUC_CONST; -guint pango_ot_ruleset_description_hash (const PangoOTRulesetDescription *desc); +guint pango_ot_ruleset_description_hash (const PangoOTRulesetDescription *desc) G_GNUC_PURE; gboolean pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1, - const PangoOTRulesetDescription *desc2); + const PangoOTRulesetDescription *desc2) G_GNUC_PURE; PangoOTRulesetDescription *pango_ot_ruleset_description_copy (const PangoOTRulesetDescription *desc); void pango_ot_ruleset_description_free (PangoOTRulesetDescription *desc); diff --git a/pango/pango-renderer.h b/pango/pango-renderer.h index 211ae283..47fbb017 100644 --- a/pango/pango-renderer.h +++ b/pango/pango-renderer.h @@ -181,7 +181,7 @@ struct _PangoRendererClass void (*_pango_reserved4) (void); }; -GType pango_renderer_get_type (void); +GType pango_renderer_get_type (void) G_GNUC_CONST; void pango_renderer_draw_layout (PangoRenderer *renderer, PangoLayout *layout, diff --git a/pango/pango-script.h b/pango/pango-script.h index 7068b55c..6aa2a937 100644 --- a/pango/pango-script.h +++ b/pango/pango-script.h @@ -124,9 +124,9 @@ void pango_script_iter_get_range (PangoScriptIter *iter, gboolean pango_script_iter_next (PangoScriptIter *iter); void pango_script_iter_free (PangoScriptIter *iter); -PangoLanguage *pango_script_get_sample_language (PangoScript script); +PangoLanguage *pango_script_get_sample_language (PangoScript script) G_GNUC_PURE; gboolean pango_language_includes_script (PangoLanguage *language, - PangoScript script); + PangoScript script) G_GNUC_PURE; G_END_DECLS diff --git a/pango/pango-tabs.h b/pango/pango-tabs.h index 160fff73..7f52d1d0 100644 --- a/pango/pango-tabs.h +++ b/pango/pango-tabs.h @@ -50,7 +50,7 @@ PangoTabArray *pango_tab_array_new_with_positions (gint size, PangoTabAlign first_alignment, gint first_position, ...); -GType pango_tab_array_get_type (void); +GType pango_tab_array_get_type (void) G_GNUC_CONST; PangoTabArray *pango_tab_array_copy (PangoTabArray *src); void pango_tab_array_free (PangoTabArray *tab_array); gint pango_tab_array_get_size (PangoTabArray *tab_array); diff --git a/pango/pango-utils.h b/pango/pango-utils.h index f44f2b55..41a8bbb0 100644 --- a/pango/pango-utils.h +++ b/pango/pango-utils.h @@ -82,13 +82,13 @@ gboolean pango_parse_stretch (const char *str, * stored in the registry). The returned string should not be * g_free'd. */ -G_CONST_RETURN char * pango_get_sysconf_subdirectory (void); +G_CONST_RETURN char * pango_get_sysconf_subdirectory (void) G_GNUC_PURE; /* Ditto for LIBDIR/pango. On Win32, use the same Pango * installation directory. This returned string should not be * g_free'd either. */ -G_CONST_RETURN char * pango_get_lib_subdirectory (void); +G_CONST_RETURN char * pango_get_lib_subdirectory (void) G_GNUC_PURE; #endif /* PANGO_ENABLE_BACKEND */ @@ -131,12 +131,12 @@ gboolean pango_is_zero_width (gunichar ch) G_GNUC_CONST; int pango_version (void) G_GNUC_CONST; /* Return run-time Pango version as an string */ -G_CONST_RETURN char * pango_version_string (void); +G_CONST_RETURN char * pango_version_string (void) G_GNUC_CONST; /* Check that run-time Pango is as new as required */ G_CONST_RETURN char * pango_version_check (int required_major, int required_minor, - int required_micro); + int required_micro) G_GNUC_CONST; G_END_DECLS diff --git a/pango/pangoatsui-private.h b/pango/pangoatsui-private.h index d63600d6..d0a1ebff 100644 --- a/pango/pangoatsui-private.h +++ b/pango/pangoatsui-private.h @@ -100,8 +100,8 @@ struct _PangoATSUIFontClass PangoFontClass parent_class; }; -GType pango_atsui_font_map_get_type (void); -GType pango_atsui_font_get_type (void); +GType pango_atsui_font_map_get_type (void) G_GNUC_CONST; +GType pango_atsui_font_get_type (void) G_GNUC_CONST; const char * _pango_atsui_face_get_postscript_name (PangoATSUIFace *face); PangoCoverage *_pango_atsui_face_get_coverage (PangoATSUIFace *face, diff --git a/pango/pangocairo-atsui.h b/pango/pangocairo-atsui.h index 2d655aa2..25613a01 100644 --- a/pango/pangocairo-atsui.h +++ b/pango/pangocairo-atsui.h @@ -43,7 +43,7 @@ struct _PangoCairoATSUIFontMap gdouble dpi; }; -GType pango_cairo_atsui_font_map_get_type (void); +GType pango_cairo_atsui_font_map_get_type (void) G_GNUC_CONST; PangoATSUIFont * _pango_cairo_atsui_font_new (PangoCairoATSUIFontMap *cafontmap, diff --git a/pango/pangocairo-atsuifont.h b/pango/pangocairo-atsuifont.h index 94bf92ab..a0f36b3f 100644 --- a/pango/pangocairo-atsuifont.h +++ b/pango/pangocairo-atsuifont.h @@ -31,7 +31,7 @@ typedef struct _PangoCairoATSUIFont PangoCairoATSUIFont; typedef struct _PangoCairoATSUIFontClass PangoCairoATSUIFontClass; -GType pango_cairo_atsui_font_get_type (void); +GType pango_cairo_atsui_font_get_type (void) G_GNUC_CONST; ATSUFontID pango_cairo_atsui_font_get_atsu_font_id (PangoCairoATSUIFont *cafont); diff --git a/pango/pangocairo-fc.h b/pango/pangocairo-fc.h index 5f9f8c04..82a6b7ec 100644 --- a/pango/pangocairo-fc.h +++ b/pango/pangocairo-fc.h @@ -43,7 +43,7 @@ struct _PangoCairoFcFontMap PangoRenderer *renderer; }; -GType pango_cairo_fc_font_map_get_type (void); +GType pango_cairo_fc_font_map_get_type (void) G_GNUC_CONST; PangoFcFont *_pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap, PangoContext *context, diff --git a/pango/pangocairo-private.h b/pango/pangocairo-private.h index 1fb100a2..9ead7fce 100644 --- a/pango/pangocairo-private.h +++ b/pango/pangocairo-private.h @@ -106,7 +106,7 @@ struct _PangoCairoFontIface gssize cf_priv_offset; }; -GType pango_cairo_font_get_type (void); +GType pango_cairo_font_get_type (void) G_GNUC_CONST; gboolean _pango_cairo_font_install (PangoFont *font, cairo_t *cr); @@ -133,7 +133,7 @@ void _pango_cairo_font_private_get_glyph_extents (PangoCairoFontPrivate *cf_priv typedef struct _PangoCairoRenderer PangoCairoRenderer; -GType pango_cairo_renderer_get_type (void); +GType pango_cairo_renderer_get_type (void) G_GNUC_CONST; const cairo_font_options_t *_pango_cairo_context_get_merged_font_options (PangoContext *context); diff --git a/pango/pangocairo-win32.h b/pango/pangocairo-win32.h index 4c0fce73..f95f4fb9 100644 --- a/pango/pangocairo-win32.h +++ b/pango/pangocairo-win32.h @@ -43,7 +43,7 @@ struct _PangoCairoWin32FontMap PangoRenderer *renderer; }; -GType pango_cairo_win32_font_map_get_type (void); +GType pango_cairo_win32_font_map_get_type (void) G_GNUC_CONST; PangoFont *_pango_cairo_win32_font_new (PangoCairoWin32FontMap *cwfontmap, PangoContext *context, diff --git a/pango/pangocairo.h b/pango/pangocairo.h index 2e75b28d..4aa27d8a 100644 --- a/pango/pangocairo.h +++ b/pango/pangocairo.h @@ -52,7 +52,7 @@ typedef void (* PangoCairoShapeRendererFunc) (cairo_t *cr, /* * PangoCairoFontMap */ -GType pango_cairo_font_map_get_type (void); +GType pango_cairo_font_map_get_type (void) G_GNUC_CONST; PangoFontMap *pango_cairo_font_map_new (void); PangoFontMap *pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype); diff --git a/pango/pangofc-decoder.h b/pango/pangofc-decoder.h index eccdc6ea..8e341469 100644 --- a/pango/pangofc-decoder.h +++ b/pango/pangofc-decoder.h @@ -95,7 +95,7 @@ struct _PangoFcDecoderClass void (*_pango_reserved4) (void); }; -GType pango_fc_decoder_get_type (void); +GType pango_fc_decoder_get_type (void) G_GNUC_CONST; FcCharSet *pango_fc_decoder_get_charset (PangoFcDecoder *decoder, PangoFcFont *fcfont); diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h index 3a6eb40d..ae16b168 100644 --- a/pango/pangofc-font.h +++ b/pango/pangofc-font.h @@ -142,7 +142,7 @@ void pango_fc_font_kern_glyphs (PangoFcFont *font, #endif /* PANGO_ENABLE_ENGINE || PANGO_ENABLE_BACKEND */ -GType pango_fc_font_get_type (void); +GType pango_fc_font_get_type (void) G_GNUC_CONST; FT_Face pango_fc_font_lock_face (PangoFcFont *font); void pango_fc_font_unlock_face (PangoFcFont *font); diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h index 50c59887..5eaf9cc9 100644 --- a/pango/pangofc-fontmap.h +++ b/pango/pangofc-fontmap.h @@ -149,7 +149,7 @@ void pango_fc_font_map_shutdown (PangoFcFontMap *fcfontmap); #endif -GType pango_fc_font_map_get_type (void); +GType pango_fc_font_map_get_type (void) G_GNUC_CONST; /** * PangoFcDecoderFindFunc: diff --git a/pango/pangoft2-private.h b/pango/pangoft2-private.h index 60b9c684..8388ec9f 100644 --- a/pango/pangoft2-private.h +++ b/pango/pangoft2-private.h @@ -77,7 +77,7 @@ struct _PangoFT2GlyphInfo #define PANGO_FT2_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT, PangoFT2Font)) #define PANGO_FT2_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT)) -GType pango_ft2_font_get_type (void); +GType pango_ft2_font_get_type (void) G_GNUC_CONST; PangoFT2Font * _pango_ft2_font_new (PangoFT2FontMap *ft2fontmap, FcPattern *pattern); @@ -111,7 +111,7 @@ void _pango_ft2_draw_error_underline (FT_Bitmap *bitmap, #define PANGO_FT2_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_RENDERER, PangoFT2Renderer)) #define PANGO_IS_FT2_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_RENDERER)) -GType pango_ft2_renderer_get_type (void); +GType pango_ft2_renderer_get_type (void) G_GNUC_CONST; PangoRenderer *_pango_ft2_font_map_get_renderer (PangoFT2FontMap *ft2fontmap); diff --git a/pango/pangoft2.h b/pango/pangoft2.h index cd285afa..27acfa6e 100644 --- a/pango/pangoft2.h +++ b/pango/pangoft2.h @@ -74,7 +74,7 @@ void pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap, int x, int y); -GType pango_ft2_font_map_get_type (void); +GType pango_ft2_font_map_get_type (void) G_GNUC_CONST; PangoFontMap *pango_ft2_font_map_new (void); void pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap, diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h index 18fac0b6..8d44dafb 100644 --- a/pango/pangowin32-private.h +++ b/pango/pangowin32-private.h @@ -256,14 +256,14 @@ struct name_record guint16 string_offset; }; -GType _pango_win32_font_get_type (void); +GType _pango_win32_font_get_type (void) G_GNUC_CONST; void _pango_win32_make_matching_logfontw (PangoFontMap *fontmap, const LOGFONTW *lfp, int size, LOGFONTW *out); -GType _pango_win32_font_map_get_type (void); +GType _pango_win32_font_map_get_type (void) G_GNUC_CONST; void _pango_win32_fontmap_cache_remove (PangoFontMap *fontmap, PangoWin32Font *xfont); diff --git a/pango/pangox-private.h b/pango/pangox-private.h index 4f4e909b..b3a9c8f3 100644 --- a/pango/pangox-private.h +++ b/pango/pangox-private.h @@ -92,7 +92,7 @@ struct _PangoXFontMap Window coverage_win; }; -GType pango_x_font_map_get_type (void); +GType pango_x_font_map_get_type (void) G_GNUC_CONST; PangoXFont * pango_x_font_new (PangoFontMap *fontmap, const char *spec, diff --git a/pango/pangoxft-render.h b/pango/pangoxft-render.h index 45bd672c..87c26a75 100644 --- a/pango/pangoxft-render.h +++ b/pango/pangoxft-render.h @@ -95,7 +95,7 @@ struct _PangoXftRendererClass int n_glyphs); }; -GType pango_xft_renderer_get_type (void); +GType pango_xft_renderer_get_type (void) G_GNUC_CONST; PangoRenderer *pango_xft_renderer_new (Display *display, int screen); diff --git a/pango/pangoxft.h b/pango/pangoxft.h index bb856b18..a84571a8 100644 --- a/pango/pangoxft.h +++ b/pango/pangoxft.h @@ -63,13 +63,13 @@ void pango_xft_set_default_substitute (Display *display, void pango_xft_substitute_changed (Display *display, int screen); -GType pango_xft_font_map_get_type (void); +GType pango_xft_font_map_get_type (void) G_GNUC_CONST; #define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont)) #define PANGO_TYPE_XFT_FONT (pango_xft_font_get_type ()) #define PANGO_XFT_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT)) -GType pango_xft_font_get_type (void); +GType pango_xft_font_get_type (void) G_GNUC_CONST; /* For shape engines */ |