glib/gobject/tests
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
..
.gitignore Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
binding.c tests/binding: Ensure that the binding goes away 2013-06-12 11:24:55 +01:00
boxed.c Improve test coverage in gobject/ 2013-05-29 08:37:08 -04:00
dynamictests.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
enums.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
ifaceproperties.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
Makefile.am Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
marshalers.list Add more tests for signal emissions 2012-03-02 17:13:04 +01:00
param.c tests: port from g_test_trap_subprocess() to g_test_trap_fork() 2013-05-13 12:10:52 -04:00
private.c Allow registering instance private data during get_type() 2013-06-24 14:18:01 +01:00
properties.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
qdata.c Improve test coverage in gobject/ 2013-05-29 08:37:08 -04:00
reference.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00
signals.c Improve signal test coverage 2013-05-29 08:37:19 -04:00
testcommon.h Move ifaceproperties test to gobject/tests/ 2010-12-27 23:49:12 -05:00
threadtests.c gtype: disallow adding interfaces after the fact 2013-01-04 21:20:04 +01:00
type.c Improve test coverage in gobject/ 2013-05-29 08:37:08 -04:00
valuearray.c Remove g_type_init() calls 2012-10-16 09:39:24 -04:00