GNOME Bugzilla – Bug 773954
gtkstylecontext: Clarify memory allocation behaviour of getters
Last modified: 2016-11-05 00:27:07 UTC
Trivial patch attached.
Created attachment 339138 [details] [review] 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.
Shouldn't the docs say that the behavior is like g_object_get()? We're using GValues after all, so it should in fact be exactly like g_object_get(). Your current patch reads to me a bit like it's trying to confuse people with that "in general" part.
(In reply to Benjamin Otte (Company) from comment #2) > Shouldn't the docs say that the behavior is like g_object_get()? > We're using GValues after all, so it should in fact be exactly like > g_object_get(). > > Your current patch reads to me a bit like it's trying to confuse people with > that "in general" part. The text in this patch is copied verbatim from the g_object_get() docs; the ‘in general’ part is, I guess, supposed to distinguish between integer/boolean/etc. values (which are not allocated) and pointer ones (which are). I can update the patch to point to the g_object_get() docs instead.
Created attachment 339139 [details] [review] 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.
Comment on attachment 339139 [details] [review] gtkstylecontext: Clarify memory allocation behaviour of getters I like formulation a lot more.
Comment on attachment 339139 [details] [review] gtkstylecontext: Clarify memory allocation behaviour of getters commit 1dbdbecd39356a6ca4d0bb06a222d3229e055b3b Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Nov 4 20:16:06 2016 +0000 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