Change GtkCalendarDetailFunc to return newly allocated string. (#339540)

* gtk/gtkcalendar.c: Release the memory returned by the detail_func.
* gtk/gtkcalendar.h: Remove G_CONST_RETURN from GtkCalendarDetailFunc.
* tests/testcalendar.c: Duplicate calendar details before returning.

svn path=/trunk/; revision=19382
This commit is contained in:
Mathias Hasselmann
2008-01-17 16:42:04 +00:00
parent 7265ed4fc8
commit 188894d18e
4 changed files with 25 additions and 12 deletions

View File

@ -89,13 +89,14 @@ typedef enum
*
* Since: 2.16
*
* Return value: Pango markup with details for the specified day, or %NULL.
* Return value: Newly allocated string with Pango markup with details
* for the specified day, or %NULL.
*/
typedef G_CONST_RETURN gchar* (*GtkCalendarDetailFunc) (GtkCalendar *calendar,
guint year,
guint month,
guint day,
gpointer user_data);
typedef gchar* (*GtkCalendarDetailFunc) (GtkCalendar *calendar,
guint year,
guint month,
guint day,
gpointer user_data);
struct _GtkCalendar
{