gobject-introspection r654 - in trunk: girepository giscanner tests/scanner



Author: walters
Date: Fri Oct  3 19:30:12 2008
New Revision: 654
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=654&view=rev

Log:
Merge branch 'bug551744-boxed-ctors'


Modified:
   trunk/girepository/gtypelib.c
   trunk/giscanner/glibtransformer.py
   trunk/tests/scanner/foo-expected.gir

Modified: trunk/girepository/gtypelib.c
==============================================================================
--- trunk/girepository/gtypelib.c	(original)
+++ trunk/girepository/gtypelib.c	Fri Oct  3 19:30:12 2008
@@ -738,6 +738,8 @@
   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);
@@ -751,6 +753,8 @@
       switch (container_type)
 	{
 	case BLOB_TYPE_BOXED:
+	case BLOB_TYPE_STRUCT:
+	case BLOB_TYPE_UNION:
 	case BLOB_TYPE_OBJECT:
 	case BLOB_TYPE_INTERFACE:
 	  break;

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Fri Oct  3 19:30:12 2008
@@ -378,7 +378,7 @@
 
         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
@@ -386,7 +386,8 @@
             # 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

Modified: trunk/tests/scanner/foo-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-expected.gir	(original)
+++ trunk/tests/scanner/foo-expected.gir	Fri Oct  3 19:30:12 2008
@@ -251,17 +251,17 @@
             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"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]