[dia] Remove G_CONST_RETURN use from dia



commit 9397eb575eabf8ab63ba6ea27d5cdb57494567ae
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jun 9 12:00:04 2011 -0400

    Remove G_CONST_RETURN use from dia
    
    It is being deprecated in bug #644611.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652209
    
    Signed-off-by: Hans Breuer <hans breuer org>

 lib/dia_xml.c |    2 +-
 lib/font.c    |   12 ++++++------
 lib/font.h    |   12 ++++++------
 3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/lib/dia_xml.c b/lib/dia_xml.c
index 2b34511..fb137db 100644
--- a/lib/dia_xml.c
+++ b/lib/dia_xml.c
@@ -240,7 +240,7 @@ xml_file_check_encoding(const gchar *filename, const gchar *default_enc)
 xmlDocPtr
 xmlDiaParseFile(const char *filename)
 {
-  G_CONST_RETURN char *local_charset = NULL;
+  const char *local_charset = NULL;
   
   if (   !g_get_charset(&local_charset)
       && local_charset) {
diff --git a/lib/font.c b/lib/font.c
index 01bb8c5..5000f55 100644
--- a/lib/font.c
+++ b/lib/font.c
@@ -414,13 +414,13 @@ dia_font_get_style(const DiaFont* font)
   return style;
 }
 
-G_CONST_RETURN char*
+const char*
 dia_font_get_family(const DiaFont* font)
 {
   return pango_font_description_get_family(font->pfd);
 }
 
-G_CONST_RETURN PangoFontDescription *
+const PangoFontDescription *
 dia_font_get_description(const DiaFont* font)
 {
   return font->pfd;
@@ -447,7 +447,7 @@ dia_font_set_height(DiaFont* font, real height)
 }
 
 
-G_CONST_RETURN char*
+const char*
 dia_font_get_psfontname(const DiaFont *font)
 {
   /* This hack corrects a couple fonts that were misnamed in
@@ -537,7 +537,7 @@ static const WeightName weight_names[] = {
   {0,NULL}
 };
 
-G_CONST_RETURN char *
+const char *
 dia_font_get_weight_string(const DiaFont* font)
 {
     const WeightName* p;
@@ -577,7 +577,7 @@ static const SlantName slant_names[] = {
   { 0, NULL} 
 };
 
-G_CONST_RETURN char *
+const char *
 dia_font_get_slant_string(const DiaFont* font)
 {
   const SlantName* p;
@@ -947,7 +947,7 @@ dia_font_new_from_legacy_name(const char* name)
   return retval;
 }
 
-G_CONST_RETURN char*
+const char*
 dia_font_get_legacy_name(const DiaFont *font)
 {
   const char* matched_name = NULL;
diff --git a/lib/font.h b/lib/font.h
index 28a4e86..caf8259 100644
--- a/lib/font.h
+++ b/lib/font.h
@@ -124,7 +124,7 @@ DiaFont* dia_font_new_from_legacy_name(const char *name);
 
     /* Get a simple font name from a font.
        Name will be valid for the duration of the DiaFont* lifetime. */ 
-G_CONST_RETURN char* dia_font_get_legacy_name(const DiaFont* font);
+const char* dia_font_get_legacy_name(const DiaFont* font);
 
     /* Same attributes */
 DiaFont *dia_font_copy(const DiaFont* font);
@@ -136,9 +136,9 @@ void dia_font_unref(DiaFont* font);
 DiaFontStyle dia_font_get_style(const DiaFont* font);
 
     /* Retrieves the family of the font. Caller must NOT free. */
-G_CONST_RETURN char* dia_font_get_family(const DiaFont* font);
+const char* dia_font_get_family(const DiaFont* font);
 /* Acessor for the PangoFontDescription */
-G_CONST_RETURN PangoFontDescription *dia_font_get_description (const DiaFont* font);
+const PangoFontDescription *dia_font_get_description (const DiaFont* font);
 
     /* Retrieves the height of the font */
 real dia_font_get_height(const DiaFont* font);
@@ -160,13 +160,13 @@ void dia_font_set_any_family(DiaFont* font, const char* family);
 
     /* FIXME: what do we do with this, actually ?
        Name lives for as long as the DiaFont lives. */
-G_CONST_RETURN char *dia_font_get_psfontname(const DiaFont *font);
+const char *dia_font_get_psfontname(const DiaFont *font);
 
     /* returns a static string suitable for SVG */
-G_CONST_RETURN char *dia_font_get_weight_string(const DiaFont* font);
+const char *dia_font_get_weight_string(const DiaFont* font);
 
     /* returns a static string suitable for SVG */
-G_CONST_RETURN char *dia_font_get_slant_string(const DiaFont* font);
+const char *dia_font_get_slant_string(const DiaFont* font);
 
     /* uses an SVG style string */
 void dia_font_set_weight_from_string(DiaFont* font, const char* weight);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]