glib/gobject
Emmanuele Bassi d3dec6ec80 Allow registering instance private data during get_type()
For static types, it should be possible to register a private data
structure right when we are registering the type, i.e. from the
get_type() implementation. By allowing this, we can take advantage of
the existing type definition macros to cut down the amount of code
necessary (as well as the knowledge baggage) when creating a new type.

The main issue with this new feature is that it cannot be mixed with the
old idiomatic way of adding private instance data by calling a function
in the middle of the class_init() implementation, as that imposes the
additional constraint of initializing the whole type hierarchy in order
to retrieve the offset of the private data in the GTypeInstance
allocation.

For this reason we are going to follow a two-step process; in the first
step, we are going to introduce the new (semi-private) API to register
the intent to add private instance data from within the get_type()
implementation, and hide it behind a macro; at the same time, the
G_DEFINE_TYPE_EXTENDED macro is going to be modified so that it will
register the private instance data if the macro was used, using a new
(semi-private) function as well. Once we have migrated all our code, we
will make the first new function perform the actual private data
registration, and turn the second new function into a no-op. This should
guarantee a transparent migration of existing code to the new idiomatic
form.

https://bugzilla.gnome.org/show_bug.cgi?id=700035
2013-06-24 14:18:01 +01:00
..
tests Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
.gitignore Stop using glib-genmarshal at build time 2011-06-20 17:24:07 -04:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
gatomicarray.c Improvde #include order consistency 2013-01-01 13:54:54 -05:00
gatomicarray.h Move single-include guards inside include guards 2012-12-27 23:43:14 -05:00
gbinding.c binding: Use hash table as a set 2013-06-12 11:24:55 +01:00
gbinding.h binding: Add an explicit unbind() 2013-05-02 15:50:21 -07:00
gboxed.c Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gboxed.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gclosure.c Improvde #include order consistency 2013-01-01 13:54:54 -05:00
gclosure.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
genums.c Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
genums.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
glib-genmarshal.c Revert "Improvde #include order consistency" 2013-01-15 19:35:52 +08:00
glib-mkenums.in glib-mkenums: fix handling of forward enum declarations 2012-02-07 13:32:22 -05:00
glib-types.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gmarshal.c Use G_VA_COPY instead of va_copy() 2012-03-08 14:51:22 +08:00
gmarshal.h gmarshal.h: replace "extern" with GLIB_AVAILABLE_IN_ALL 2013-01-13 13:13:55 -05:00
gmarshal.list Update the comment in gmarshal.list 2012-06-23 17:53:22 -04:00
gobject_probes.d Add missing semicolons to gobject_probes.d 2012-10-15 19:48:44 -04:00
gobject_trace.h Add dtrace and systemtap support for gobject 2010-05-27 14:51:41 -04:00
gobject-query.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
gobject.c GObject: turn add-property-after-init to a warning 2013-06-10 11:18:06 -04:00
gobject.h Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gobject.py Initial support for gdb python macros 2009-09-21 15:39:00 +02:00
gobject.rc.in Update the year in the *.rc.in files 2011-06-07 08:55:31 +08:00
gobject.stp.in Add dtrace and systemtap support for gobject 2010-05-27 14:51:41 -04:00
gobjectnotifyqueue.c [notify] add warning to gobjectnotifyqueue.c 2011-11-16 17:50:13 +00:00
gparam.c Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gparam.h GParamSpec: add g_param_spec_get_default_value() 2013-04-23 14:39:09 -04:00
gparamspecs.c GParamSpec: Make constructors introspectable 2013-01-14 11:36:14 +01:00
gparamspecs.h Add a new _GLIB_EXTERN macro for "extern" 2013-01-13 13:13:36 -05:00
gsignal.c gsignal: remove some pointless locking 2013-05-23 21:50:54 -04:00
gsignal.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gsourceclosure.c Install an invalidation notifier for GClosure in g_source_set_closure() 2013-01-20 16:23:32 +01:00
gsourceclosure.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gtype-private.h GObject: prevent installing properties after init 2013-05-29 09:25:25 -04:00
gtype.c Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
gtype.h Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
gtypemodule.c Do not use static GTypeInfo and GInterfaceInfo 2011-11-29 22:03:25 -05:00
gtypemodule.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gtypeplugin.c Do not use static GTypeInfo and GInterfaceInfo 2011-11-29 22:03:25 -05:00
gtypeplugin.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gvalue.c Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gvalue.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gvaluearray.c Clarify GValueArray docs 2013-05-09 16:04:54 -04:00
gvaluearray.h GValueArray: clarify the deprecation warnings 2013-01-02 13:02:51 -05:00
gvaluecollector.h Constify collect and lcopy strings in GTypeValueTable 2012-07-05 23:27:35 -04:00
gvaluetransform.c valuetransform: Fix definition of ulong_bool 2012-06-27 10:59:29 +02:00
gvaluetypes.c Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gvaluetypes.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
libgobject-gdb.py.in Avoid shadowing the dir builtin 2010-12-03 14:08:36 -05:00
Makefile.am Rework the build system for a new tests approach 2013-05-31 23:12:15 -04:00
makefile.msc.in gobject/: fully remove gobjectalias hacks 2010-07-07 19:40:48 -04:00
marshal-genstrings.pl Hacky script to fix up your .msc.in files on windows. Dunno if this is a 2001-08-04 15:49:55 +00:00