[PATCH] 2 G_CONST_RETURNs
- From: murrayc t-online de (Murray Cumming)
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: [PATCH] 2 G_CONST_RETURNs
- Date: 21 Oct 2001 05:20:46 +0200
May I commit this patch, which adds some G_CONST_RETURNs so that
language bindings (and people) know that they should free the gchar*
return values?
--
Murray Cumming
murrayc usa net
www.murrayc.com
? gtk+.kdevses
? gtk+.kdevprj
? gtk2.proj
? .snprj
? gtktoolbar_signal_params.patch
? const_return.patch
Index: gtk/gtkclist.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.c,v
retrieving revision 1.205
diff -u -p -r1.205 gtkclist.c
--- gtk/gtkclist.c 2001/09/19 00:49:51 1.205
+++ gtk/gtkclist.c 2001/10/21 03:08:37
@@ -1507,7 +1507,7 @@ gtk_clist_set_column_title (GtkCList
size_allocate_title_buttons (clist);
}
-gchar *
+G_CONST_RETURN gchar *
gtk_clist_get_column_title (GtkCList *clist,
gint column)
{
Index: gtk/gtkclist.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.h,v
retrieving revision 1.57
diff -u -p -r1.57 gtkclist.h
--- gtk/gtkclist.h 2001/04/24 14:58:32 1.57
+++ gtk/gtkclist.h 2001/10/21 03:08:38
@@ -504,7 +504,7 @@ void gtk_clist_set_column_title (GtkCLis
const gchar *title);
/* returns the title of column. Returns NULL if title is not set */
-gchar * gtk_clist_get_column_title (GtkCList *clist,
+G_CONST_RETURN gchar * gtk_clist_get_column_title (GtkCList *clist,
gint column);
/* set a widget instead of a title for the column title button */
Index: gtk/gtkfontsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfontsel.c,v
retrieving revision 1.57
diff -u -p -r1.57 gtkfontsel.c
--- gtk/gtkfontsel.c 2001/09/18 20:06:46 1.57
+++ gtk/gtkfontsel.c 2001/10/21 03:08:38
@@ -957,7 +957,7 @@ gtk_font_selection_set_font_name (GtkFon
/* This returns the text in the preview entry. You should copy the returned
text if you need it. */
-gchar*
+G_CONST_RETURN gchar*
gtk_font_selection_get_preview_text (GtkFontSelection *fontsel)
{
return gtk_entry_get_text (GTK_ENTRY (fontsel->preview_entry));
Index: gtk/gtkfontsel.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfontsel.h,v
retrieving revision 1.15
diff -u -p -r1.15 gtkfontsel.h
--- gtk/gtkfontsel.h 2001/09/18 20:06:46 1.15
+++ gtk/gtkfontsel.h 2001/10/21 03:08:38
@@ -137,7 +137,7 @@ GdkFont* gtk_font_selection_get_font
gboolean gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
const gchar *fontname);
-gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel);
+G_CONST_RETURN gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel);
void gtk_font_selection_set_preview_text (GtkFontSelection *fontsel,
const gchar *text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]