summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-11-04 20:16:06 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2016-11-05 00:25:25 +0000
commit1dbdbecd39356a6ca4d0bb06a222d3229e055b3b (patch)
tree6933737ae592ee17ac268f3187366e42b5d19537
parentf4fa111e3240822df1b1c02abc49fea9c274232c (diff)
downloadgtk+-1dbdbecd39356a6ca4d0bb06a222d3229e055b3b.tar.gz
gtkstylecontext: Clarify memory allocation behaviour of getters
It wasn’t clear that gtk_style_context_get[_valist]() behave like g_object_get() — i.e. pointer-based types are returned newly-allocated. Clarify that. https://bugzilla.gnome.org/show_bug.cgi?id=773954
-rw-r--r--gtk/gtkstylecontext.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 881bc45511..150d404da3 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -774,6 +774,12 @@ gtk_style_context_get_property (GtkStyleContext *context,
*
* See gtk_style_context_get_property() for details.
*
+ * As with g_object_get(), a copy is made of the property contents for
+ * pointer-valued properties, and the caller is responsible for freeing the
+ * memory in the appropriate manner for the type. For example, by calling
+ * g_free() or g_object_unref(). Non-pointer-valued properties, such as
+ * integers, are returned by value and do not need to be freed.
+ *
* Since: 3.0
*/
void
@@ -819,6 +825,12 @@ gtk_style_context_get_valist (GtkStyleContext *context,
*
* See gtk_style_context_get_property() for details.
*
+ * As with g_object_get(), a copy is made of the property contents for
+ * pointer-valued properties, and the caller is responsible for freeing the
+ * memory in the appropriate manner for the type. For example, by calling
+ * g_free() or g_object_unref(). Non-pointer-valued properties, such as
+ * integers, are returned by value and do not need to be freed.
+ *
* Since: 3.0
*/
void