summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-06-09 11:36:59 -0400
committerRyan Lortie <desrt@desrt.ca>2011-06-09 13:02:27 -0400
commit4c7807daee7189f481d7c18b56b06d7b7dba7884 (patch)
treecd8356382775b26b5402d0a6b5750fb3faba2b35
parentc5a91abf1e24735be6c67dcb5d4e9ee0d66edd65 (diff)
downloadpango-4c7807daee7189f481d7c18b56b06d7b7dba7884.tar.gz
Stop using G_CONST_RETURN in Pango
G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop using it in Pango. https://bugzilla.gnome.org/show_bug.cgi?id=652202
-rw-r--r--modules/hebrew/hebrew-shaper.c2
-rw-r--r--pango/fonts.c6
-rw-r--r--pango/pango-attributes.c2
-rw-r--r--pango/pango-attributes.h2
-rw-r--r--pango/pango-context.c2
-rw-r--r--pango/pango-context.h6
-rw-r--r--pango/pango-font.h6
-rw-r--r--pango/pango-fontmap.c2
-rw-r--r--pango/pango-language.c6
-rw-r--r--pango/pango-language.h6
-rw-r--r--pango/pango-layout.c4
-rw-r--r--pango/pango-layout.h2
-rw-r--r--pango/pango-ot-ruleset.c2
-rw-r--r--pango/pango-renderer.c2
-rw-r--r--pango/pango-renderer.h2
-rw-r--r--pango/pango-script.c8
-rw-r--r--pango/pango-script.h12
-rw-r--r--pango/pango-utils.c4
-rw-r--r--pango/pango-utils.h12
-rw-r--r--pango/pangocairo-context.c4
-rw-r--r--pango/pangoft2.c2
-rw-r--r--pango/pangox-fontmap.c4
22 files changed, 49 insertions, 49 deletions
diff --git a/modules/hebrew/hebrew-shaper.c b/modules/hebrew/hebrew-shaper.c
index 8aa36381..db3055b7 100644
--- a/modules/hebrew/hebrew-shaper.c
+++ b/modules/hebrew/hebrew-shaper.c
@@ -167,7 +167,7 @@ static const gboolean compose_table[4][4] = {
#define is_composible(cur_wc, nxt_wc) (compose_table[char_type_table[ucs2iso8859_8 (cur_wc)]]\
[char_type_table[ucs2iso8859_8 (nxt_wc)]])
-G_CONST_RETURN char *
+const char *
hebrew_shaper_get_next_cluster(const char *text,
gint length,
gunichar *cluster,
diff --git a/pango/fonts.c b/pango/fonts.c
index c4681e04..6d35f83e 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -155,7 +155,7 @@ pango_font_description_set_family_static (PangoFontDescription *desc,
* %NULL if not previously set. This has the same life-time
* as the font description itself and should not be freed.
**/
-G_CONST_RETURN char *
+const char *
pango_font_description_get_family (const PangoFontDescription *desc)
{
g_return_val_if_fail (desc != NULL, NULL);
@@ -1908,7 +1908,7 @@ pango_font_family_init (PangoFontFamily *family G_GNUC_UNUSED)
* Return value: the name of the family. This string is owned
* by the family object and must not be modified or freed.
**/
-G_CONST_RETURN char *
+const char *
pango_font_family_get_name (PangoFontFamily *family)
{
g_return_val_if_fail (PANGO_IS_FONT_FAMILY (family), NULL);
@@ -2041,7 +2041,7 @@ pango_font_face_is_synthesized (PangoFontFace *face)
* Return value: the face name for the face. This string is
* owned by the face object and must not be modified or freed.
**/
-G_CONST_RETURN char *
+const char *
pango_font_face_get_face_name (PangoFontFace *face)
{
g_return_val_if_fail (PANGO_IS_FONT_FACE (face), NULL);
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 43abc3f0..4b9d5071 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -97,7 +97,7 @@ pango_attr_type_register (const gchar *name)
*
* Since: 1.22
**/
-G_CONST_RETURN char *
+const char *
pango_attr_type_get_name (PangoAttrType type)
{
const char *result = NULL;
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 866e35dd..59f97a3a 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -180,7 +180,7 @@ struct _PangoAttrFontDesc
};
PangoAttrType pango_attr_type_register (const gchar *name);
-G_CONST_RETURN char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST;
+const char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST;
void pango_attribute_init (PangoAttribute *attr,
const PangoAttrClass *klass);
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 696dadbe..110a6f36 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -188,7 +188,7 @@ pango_context_set_matrix (PangoContext *context,
*
* Since: 1.6
**/
-G_CONST_RETURN PangoMatrix *
+const PangoMatrix *
pango_context_get_matrix (PangoContext *context)
{
g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL);
diff --git a/pango/pango-context.h b/pango/pango-context.h
index d8c3cb86..d85928a5 100644
--- a/pango/pango-context.h
+++ b/pango/pango-context.h
@@ -84,9 +84,9 @@ void pango_context_set_gravity_hint (PangoContext
PangoGravityHint hint);
PangoGravityHint pango_context_get_gravity_hint (PangoContext *context);
-void pango_context_set_matrix (PangoContext *context,
- const PangoMatrix *matrix);
-G_CONST_RETURN PangoMatrix *pango_context_get_matrix (PangoContext *context);
+void pango_context_set_matrix (PangoContext *context,
+ const PangoMatrix *matrix);
+const PangoMatrix * pango_context_get_matrix (PangoContext *context);
/* Break a string of Unicode characters into segments with
* consistent shaping/language engine and bidrectional level.
diff --git a/pango/pango-font.h b/pango/pango-font.h
index b5b2cf14..eea27b4e 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -117,7 +117,7 @@ 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_GNUC_PURE;
+const 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) G_GNUC_PURE;
@@ -212,7 +212,7 @@ 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) G_GNUC_PURE;
+const 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
@@ -261,7 +261,7 @@ 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_GNUC_PURE;
+const 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);
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index f4a9733d..ea6bb574 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -292,7 +292,7 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap,
*
* Since: 1.4
**/
-G_CONST_RETURN char *
+const char *
pango_font_map_get_shape_engine_type (PangoFontMap *fontmap)
{
g_return_val_if_fail (PANGO_IS_FONT_MAP (fontmap), NULL);
diff --git a/pango/pango-language.c b/pango/pango-language.c
index d104cde0..5b8583e9 100644
--- a/pango/pango-language.c
+++ b/pango/pango-language.c
@@ -311,7 +311,7 @@ pango_language_from_string (const char *language)
* Returns: a string representing the language tag. This is owned by
* Pango and should not be freed.
*/
-G_CONST_RETURN char *
+const char *
(pango_language_to_string) (PangoLanguage *language)
{
return pango_language_to_string (language);
@@ -523,7 +523,7 @@ static const LangInfo lang_texts[] = {
* Return value: the sample string. This value is owned by Pango
* and should not be freed.
**/
-G_CONST_RETURN char *
+const char *
pango_language_get_sample_string (PangoLanguage *language)
{
const LangInfo *lang_info;
@@ -585,7 +585,7 @@ pango_language_get_sample_string (PangoLanguage *language)
* Since: 1.22
**/
-G_CONST_RETURN PangoScript *
+const PangoScript *
pango_language_get_scripts (PangoLanguage *language,
int *num_scripts)
{
diff --git a/pango/pango-language.h b/pango/pango-language.h
index 37cdc164..31660ca3 100644
--- a/pango/pango-language.h
+++ b/pango/pango-language.h
@@ -34,11 +34,11 @@ typedef struct _PangoLanguage PangoLanguage;
GType pango_language_get_type (void) G_GNUC_CONST;
PangoLanguage *pango_language_from_string (const char *language);
-G_CONST_RETURN char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST;
+const char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST;
/* For back compat. Will have to keep indefinitely. */
#define pango_language_to_string(language) ((const char *)language)
-G_CONST_RETURN char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST;
+const 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,
@@ -48,7 +48,7 @@ gboolean pango_language_matches (PangoLanguage *language,
gboolean pango_language_includes_script (PangoLanguage *language,
PangoScript script) G_GNUC_PURE;
-G_CONST_RETURN PangoScript *pango_language_get_scripts (PangoLanguage *language,
+const PangoScript *pango_language_get_scripts (PangoLanguage *language,
int *num_scripts);
G_END_DECLS
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 7455b20e..dd4f3913 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -677,7 +677,7 @@ pango_layout_set_font_description (PangoLayout *layout,
*
* Since: 1.8
**/
-G_CONST_RETURN PangoFontDescription *
+const PangoFontDescription *
pango_layout_get_font_description (PangoLayout *layout)
{
g_return_val_if_fail (PANGO_IS_LAYOUT (layout), NULL);
@@ -1087,7 +1087,7 @@ pango_layout_set_text (PangoLayout *layout,
*
* Return value: the text in the @layout.
**/
-G_CONST_RETURN char*
+const char*
pango_layout_get_text (PangoLayout *layout)
{
g_return_val_if_fail (PANGO_IS_LAYOUT (layout), NULL);
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 9929f450..bb0a0cf3 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -118,7 +118,7 @@ void pango_layout_set_markup_with_accel (PangoLayout *layout,
void pango_layout_set_font_description (PangoLayout *layout,
const PangoFontDescription *desc);
-G_CONST_RETURN PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout);
+const PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout);
void pango_layout_set_width (PangoLayout *layout,
int width);
diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c
index 81306a77..82f82108 100644
--- a/pango/pango-ot-ruleset.c
+++ b/pango/pango-ot-ruleset.c
@@ -76,7 +76,7 @@ pango_ot_ruleset_finalize (GObject *object)
*
* Since: 1.18
**/
-G_CONST_RETURN PangoOTRuleset *
+const PangoOTRuleset *
pango_ot_ruleset_get_for_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc)
{
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index de3f0204..1565e640 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -1348,7 +1348,7 @@ pango_renderer_set_matrix (PangoRenderer *renderer,
*
* Since: 1.8
**/
-G_CONST_RETURN PangoMatrix *
+const PangoMatrix *
pango_renderer_get_matrix (PangoRenderer *renderer)
{
g_return_val_if_fail (PANGO_IS_RENDERER (renderer), NULL);
diff --git a/pango/pango-renderer.h b/pango/pango-renderer.h
index 354127b7..5410a9fe 100644
--- a/pango/pango-renderer.h
+++ b/pango/pango-renderer.h
@@ -249,7 +249,7 @@ PangoColor *pango_renderer_get_color (PangoRenderer *renderer,
void pango_renderer_set_matrix (PangoRenderer *renderer,
const PangoMatrix *matrix);
-G_CONST_RETURN PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer);
+const PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer);
PangoLayout *pango_renderer_get_layout (PangoRenderer *renderer);
PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer *renderer);
diff --git a/pango/pango-script.c b/pango/pango-script.c
index a76eb70b..92f2ef11 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -164,10 +164,10 @@ pango_script_iter_free (PangoScriptIter *iter)
* Since: 1.4
**/
void
-pango_script_iter_get_range (PangoScriptIter *iter,
- G_CONST_RETURN char **start,
- G_CONST_RETURN char **end,
- PangoScript *script)
+pango_script_iter_get_range (PangoScriptIter *iter,
+ const char **start,
+ const char **end,
+ PangoScript *script)
{
if (start)
*start = iter->script_start;
diff --git a/pango/pango-script.h b/pango/pango-script.h
index 32ef7372..ef5f698b 100644
--- a/pango/pango-script.h
+++ b/pango/pango-script.h
@@ -128,12 +128,12 @@ PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CO
PangoScriptIter *pango_script_iter_new (const char *text,
int length);
-void pango_script_iter_get_range (PangoScriptIter *iter,
- G_CONST_RETURN char **start,
- G_CONST_RETURN char **end,
- PangoScript *script);
-gboolean pango_script_iter_next (PangoScriptIter *iter);
-void pango_script_iter_free (PangoScriptIter *iter);
+void pango_script_iter_get_range (PangoScriptIter *iter,
+ const char **start,
+ const char **end,
+ PangoScript *script);
+gboolean pango_script_iter_next (PangoScriptIter *iter);
+void pango_script_iter_free (PangoScriptIter *iter);
#include <pango/pango-language.h>
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 729b77db..44ec353d 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -690,7 +690,7 @@ DllMain (HINSTANCE hinstDLL,
* Return value: the Pango sysconf directory. The returned string should
* not be freed.
*/
-G_CONST_RETURN char *
+const char *
pango_get_sysconf_subdirectory (void)
{
static const gchar *result = NULL;
@@ -723,7 +723,7 @@ pango_get_sysconf_subdirectory (void)
* Return value: the Pango lib directory. The returned string should
* not be freed.
*/
-G_CONST_RETURN char *
+const char *
pango_get_lib_subdirectory (void)
{
static const gchar *result = NULL;
diff --git a/pango/pango-utils.h b/pango/pango-utils.h
index 41a8bbb0..f86c6620 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_GNUC_PURE;
+const 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_GNUC_PURE;
+const 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_GNUC_CONST;
+const 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) G_GNUC_CONST;
+const char * pango_version_check (int required_major,
+ int required_minor,
+ int required_micro) G_GNUC_CONST;
G_END_DECLS
diff --git a/pango/pangocairo-context.c b/pango/pangocairo-context.c
index c023059b..b83ee417 100644
--- a/pango/pangocairo-context.c
+++ b/pango/pangocairo-context.c
@@ -260,7 +260,7 @@ pango_cairo_context_set_font_options (PangoContext *context,
*
* Since: 1.10
**/
-G_CONST_RETURN cairo_font_options_t *
+const cairo_font_options_t *
pango_cairo_context_get_font_options (PangoContext *context)
{
PangoCairoContextInfo *info;
@@ -286,7 +286,7 @@ pango_cairo_context_get_font_options (PangoContext *context)
* Return value: the combined set of font options. This value is owned
* by the context and must not be modified or freed.
**/
-G_CONST_RETURN cairo_font_options_t *
+const cairo_font_options_t *
_pango_cairo_context_get_merged_font_options (PangoContext *context)
{
PangoCairoContextInfo *info = get_context_info (context, TRUE);
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index f4a3864b..b41c468a 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -520,7 +520,7 @@ ft_error_compare (const void *pkey,
return ((ft_error_description *) pkey)->code - ((ft_error_description *) pbase)->code;
}
-G_CONST_RETURN char *
+const char *
_pango_ft2_ft_strerror (FT_Error error)
{
#undef __FTERRORS_H__
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 9e0e258b..30946452 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -1414,7 +1414,7 @@ pango_x_fontmap_atom_from_name (PangoFontMap *fontmap,
}
-G_CONST_RETURN char *
+const char *
pango_x_fontmap_name_from_atom (PangoFontMap *fontmap,
Atom atom)
{
@@ -1597,7 +1597,7 @@ pango_x_family_list_faces (PangoFontFamily *family,
}
}
-static G_CONST_RETURN char *
+static const char *
pango_x_family_get_name (PangoFontFamily *family)
{
PangoXFamily *xfamily = PANGO_X_FAMILY (family);