mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
d3dec6ec80
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 |
||
---|---|---|
.. | ||
tests | ||
.gitignore | ||
ChangeLog | ||
gatomicarray.c | ||
gatomicarray.h | ||
gbinding.c | ||
gbinding.h | ||
gboxed.c | ||
gboxed.h | ||
gclosure.c | ||
gclosure.h | ||
genums.c | ||
genums.h | ||
glib-genmarshal.c | ||
glib-mkenums.in | ||
glib-types.h | ||
gmarshal.c | ||
gmarshal.h | ||
gmarshal.list | ||
gobject_probes.d | ||
gobject_trace.h | ||
gobject-query.c | ||
gobject.c | ||
gobject.h | ||
gobject.py | ||
gobject.rc.in | ||
gobject.stp.in | ||
gobjectnotifyqueue.c | ||
gparam.c | ||
gparam.h | ||
gparamspecs.c | ||
gparamspecs.h | ||
gsignal.c | ||
gsignal.h | ||
gsourceclosure.c | ||
gsourceclosure.h | ||
gtype-private.h | ||
gtype.c | ||
gtype.h | ||
gtypemodule.c | ||
gtypemodule.h | ||
gtypeplugin.c | ||
gtypeplugin.h | ||
gvalue.c | ||
gvalue.h | ||
gvaluearray.c | ||
gvaluearray.h | ||
gvaluecollector.h | ||
gvaluetransform.c | ||
gvaluetypes.c | ||
gvaluetypes.h | ||
libgobject-gdb.py.in | ||
Makefile.am | ||
makefile.msc.in | ||
marshal-genstrings.pl |