GNOME Bugzilla – Bug 729167
gobject: Document that classes/objects/interfaces are zero-filled
Last modified: 2014-04-29 09:42:54 UTC
Patch added which documents this in a few (hopefully) obvious places.
Created attachment 275402 [details] [review] gobject: Document that classes/objects/interfaces are zero-filled On initialisation, GObject guarantees to zero-fill class/object/interface structures. Document this so people don’t spend forever writing: my_object->priv->some_member = NULL; my_object->priv->some_other_member = NULL;
Review of attachment 275402 [details] [review]: Looks good, but please remove all uses of "implicit" from the additions (since it doesn't add anything and it may confuse). implicit: 1. suggested though not directly expressed
Created attachment 275405 [details] [review] gobject: Document that classes/objects/interfaces are zero-filled On initialisation, GObject guarantees to zero-fill class/object/interface structures. Document this so people don’t spend forever writing: my_object->priv->some_member = NULL; my_object->priv->some_other_member = NULL;
Comment on attachment 275405 [details] [review] gobject: Document that classes/objects/interfaces are zero-filled Merged to master with s/implicit/automatic/. commit 704852ff097f848dcb89ba553431b460938d8d91 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Tue Apr 29 08:47:14 2014 +0100 gobject: Document that classes/objects/interfaces are zero-filled On initialisation, GObject guarantees to zero-fill class/object/interface structures. Document this so people don’t spend forever writing: my_object->priv->some_member = NULL; my_object->priv->some_other_member = NULL; https://bugzilla.gnome.org/show_bug.cgi?id=729167 docs/reference/gobject/tut_howto.xml | 9 ++++++--- gobject/gtype.c | 11 +++++++++-- gobject/gtype.h | 7 +++++++ 3 files changed, 22 insertions(+), 5 deletions(-)