The attached patch allows to write:
constructor (self)
{
/* hi */
}
dispose (self)
{
/* hi */
}
finalize (self)
{
/* hi */
}
instead of:
override (G:Object) GObject *
constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
object = PARENT_HANDLER(type, n_construct_properties, construct_params);
self = SELF(object);
/* hi */
return object;
}
override (G:Object) void
dispose (GObject *object)
{
Self *self = SELF(object);
/* hi */
PARENT_HANDLER(object);
}
override (G:Object) void
finalize (GObject *object)
{
Self *self = SELF(object);
/* hi */
PARENT_HANDLER(object);
}
In my opinion, these virtual methods are used so often that they
deserve such first-class support.
Of course, to preserve backwards compatibility, the normal override
syntax is still supported.
-- Jean-Yves Lefort <jylefort_at_brutele.be>
This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT