Add macros and symbols for private data on dynamic types
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 26 Jul 2013 15:45:48 +0000 (16:45 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 27 Jul 2013 00:56:54 +0000 (20:56 -0400)
commitca6b93d0936e6864d374d3e8f2a795c1702b28b3
tree176d27d8e3b76eea66c1869afa302e9fe45de0fe
parentd2bb019533bbcbd1cee3891822ac7ba6ff55ad3d
Add macros and symbols for private data on dynamic types

We need a TypeName_private_offset variable defined by the macros used to
register dynamic types. We also need to call the adjust_private_offset()
function inside class_init(). G_ADD_PRIVATE_DYNAMIC only sets the size
of the private data structure, and relies on the behaviour of the
g_type_class_adjuset_private_offset() function to register the private
data structure at class init time if passed a value greater than zero.

This allows using G_PRIVATE_OFFSET with dynamic types.
gobject/gtypemodule.h