GType: add accessor for instance private offset
authorRyan Lortie <desrt@desrt.ca>
Tue, 23 Apr 2013 14:38:23 +0000 (10:38 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 23 Apr 2013 18:39:09 +0000 (14:39 -0400)
commitc30c0bb34d80013489897c49bef36cc56972d5d9
tree115ff297d5b8c9b70a3295e60e146869b07187e0
parenteb860fd898a6a2bd86c11d245294cd0e8cd4304b
GType: add accessor for instance private offset

Since instance private data is now always at a constant offset to the
instance pointer, we can add an accessor for it that doesn't also
require an instance.

The idea is that classes can call this from their class_init and store
it in a file-scoped static variable and use that to find their private
data on instances very quickly, without a priv pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=698056
docs/reference/gobject/gobject-sections.txt
gobject/gtype.c
gobject/gtype.h