switch (container_type)
{
case BLOB_TYPE_BOXED:
+ case BLOB_TYPE_STRUCT:
+ case BLOB_TYPE_UNION:
case BLOB_TYPE_OBJECT:
case BLOB_TYPE_INTERFACE:
is_method = !(blob->constructor || blob->setter || blob->getter || blob->wraps_vfunc);
switch (container_type)
{
case BLOB_TYPE_BOXED:
+ case BLOB_TYPE_STRUCT:
+ case BLOB_TYPE_UNION:
case BLOB_TYPE_OBJECT:
case BLOB_TYPE_INTERFACE:
break;
if not is_method:
# Interfaces can't have constructors, punt to global scope
- if isinstance(klass, (GLibInterface, GLibBoxed)):
+ if isinstance(klass, GLibInterface):
#print "NOTE: Rejecting constructor for"+\
# " interface type: %r" % (func.symbol, )
return None
# class from the prefix
# But for now, ensure that constructor returns are always
# the most concrete class
- func.retval.type = Type(klass.name, klass.ctype+'*')
+ func.retval.type = Type(klass.name,
+ self._transformer.ctype_of(klass)+'*')
self._remove_attribute(func.name)
# Strip namespace and object prefix: gtk_window_new -> new
c:type="FooBoxed"
glib:type-name="FooBoxed"
glib:get-type="foo_boxed_get_type">
+ <constructor name="new" c:identifier="foo_boxed_new">
+ <return-value>
+ <type name="Boxed" c:type="FooBoxed*"/>
+ </return-value>
+ </constructor>
<method name="method" c:identifier="foo_boxed_method">
<return-value>
<type name="none" c:type="void"/>
</return-value>
</method>
</record>
- <function name="boxed_new" c:identifier="foo_boxed_new">
- <return-value>
- <type name="Boxed" c:type="FooBoxed*"/>
- </return-value>
- </function>
<record name="DBusData"
c:type="FooDBusData"
glib:type-name="FooDBusData"