gobject-introspection r320 - in branches/gir-compiler: tests tools



Author: johan
Date: Thu Aug  7 21:29:58 2008
New Revision: 320
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=320&view=rev

Log:
Update boxed.test so it can be compiled. Add more debugging to girnode.c

Modified:
   branches/gir-compiler/tests/boxed.test
   branches/gir-compiler/tools/girnode.c

Modified: branches/gir-compiler/tests/boxed.test
==============================================================================
--- branches/gir-compiler/tests/boxed.test	(original)
+++ branches/gir-compiler/tests/boxed.test	Thu Aug  7 21:29:58 2008
@@ -6,45 +6,58 @@
   <namespace name="Foo">
     <glib:boxed glib:name="BoxedType1" glib:type-name="boxed1" glib:get-type="boxed1_get_type" deprecated="1">
       <field name="field1" readable="1" writable="1" offset="0">
-	<type name="guint32" c:type="guint32"/>
+        <type name="guint32" c:type="guint32"/>
       </field>
       <field name="field2" readable="1" writable="1" offset="4">
-	<type name="guint32" c:type="guint32"/>
+        <type name="guint32" c:type="guint32"/>
       </field>
       <field name="field3" readable="1" writable="1" offset="8">
-	<type name="guint32" c:type="guint32"/>
+        <type name="guint32" c:type="guint32"/>
       </field>
       <method name="frob_boxed1" c:identifier="frob_boxed1">
         <return-value>
           <!-- FIXME: name=void should be none -->
-	  <type name="void" c:type="void" />
-	</return-value>
+          <type name="void" c:type="void" />
+        </return-value>
         <parameters>
           <parameter name="box" transfer="full" direction="in">
-	    <type name="BoxedType1" c:type="boxed1*"/> 
-	  </parameter>
+            <type name="BoxedType1" c:type="boxed1*"/> 
+          </parameter>
           <parameter name="w" transfer="full" direction="in">
-	    <type name="GList" c:type="GList*"/>
-	  </parameter>
+            <!-- FIXME: put this in a sub node -->
+            <!--
+            <type name="sequence" c:type="GList*">
+              <type name="boxed2" c:type="boxed2*"/>
+            </type>
+              -->
+            <type name="GList<boxed2*>*" c:type="GList*"/>
+          </parameter>
           <parameter name="t" transfer="full" direction="in">
-	    <type name="GHashTable" c:type="GHashTable*"/>
-	  </parameter>
+            <!-- FIXME: put this in a sub node -->
+            <!--
+            <type name="mapping" c:type="GHashTable*">
+              <type name="utf8" c:type="gchar*"/>
+              <type name="int64" c:type="gint64"/>
+            </type>
+              -->
+            <type name="GHashTable<utf8,gint64>*" c:type="GHashTable*"/>
+          </parameter>
           <parameter name="e" transfer="full" direction="out">
             <type name="GError" c:type="GError**"/>
-	  </parameter>
+          </parameter>
         </parameters>
       </method>
       <method name="lart" c:identifier="lart">
         <return-value>
-	  <type name="boolean" c:type="gboolean"/>
-	</return-value>
+          <type name="boolean" c:type="gboolean"/>
+        </return-value>
         <parameters>
           <parameter name="box" transfer="full" direction="in">
-  	    <type name="object" c:type="boxed*"/>
-	  </parameter>
+            <type name="boxed2*" c:type="boxed2*"/>
+          </parameter>
           <parameter name="val" transfer="full" direction="inout">
-  	    <type name="uint" c:type="guint*"/>
-	  </parameter>
+            <type name="uint" c:type="guint*"/>
+          </parameter>
         </parameters>
       </method>
     </glib:boxed>
@@ -54,11 +67,11 @@
       </return-value>
       <parameters>
         <parameter name="v1" direction="in">
-	  <type name="int" c:type="gint"/>
-	</parameter>
+          <type name="int" c:type="gint"/>
+        </parameter>
         <parameter name="val2" direction="in">
-	  <type name="int" c:type="gint"/>
-	</parameter>
+          <type name="int" c:type="gint"/>
+        </parameter>
       </parameters>
     </function>
     <glib:boxed glib:name="boxed2" glib:type-name="BoxedType2" glib:get-type="boxed2_get_type" deprecated="1">

Modified: branches/gir-compiler/tools/girnode.c
==============================================================================
--- branches/gir-compiler/tools/girnode.c	(original)
+++ branches/gir-compiler/tools/girnode.c	Thu Aug  7 21:29:58 2008
@@ -603,8 +603,8 @@
 
   g_assert (node != NULL);
 
-  g_printerr ("node %p type %s\n", node,
-	      g_ir_node_type_to_string (node->type));
+  g_debug ("node %p type %s\n", node,
+	   g_ir_node_type_to_string (node->type));
 
   switch (node->type)
     {
@@ -649,8 +649,8 @@
 	  size = 4;
 	else
 	  {
-	    g_printerr ("node %p type tag %s\n", node,
-			gi_type_tag_to_string (type->tag));
+	    g_debug ("node %p type tag %s\n", node,
+		     gi_type_tag_to_string (type->tag));
 
 	    switch (type->tag)
 	      {
@@ -1058,7 +1058,7 @@
       goto out;
     }
 
-  g_warning ("Entry %s not found", name);
+  g_warning ("Entry '%s' not found", name);
 
  out:
 
@@ -1195,18 +1195,22 @@
 
 void
 g_ir_node_build_metadata (GIrNode   *node,
-			   GIrModule *module,
-			   GList      *modules,
-			   GHashTable *strings,
-			   GHashTable *types,
-			   guchar     *data,
-			   guint32    *offset,
-                           guint32    *offset2)
+			  GIrModule *module,
+			  GList      *modules,
+			  GHashTable *strings,
+			  GHashTable *types,
+			  guchar     *data,
+			  guint32    *offset,
+			  guint32    *offset2)
 {
   GList *l;
   guint32 old_offset = *offset;
   guint32 old_offset2 = *offset2;
 
+  g_assert (node != NULL);
+
+  g_debug ("build_medatadata(%s)\n", g_ir_node_type_to_string (node->type));
+
   switch (node->type)
     {
     case G_IR_NODE_TYPE:
@@ -1442,8 +1446,8 @@
 	    GIrNode *param = (GIrNode *)l->data;
 
 	    g_ir_node_build_metadata (param, 
-				       module, modules, strings, types,
-				       data, &signature, offset2);
+				      module, modules, strings, types,
+				      data, &signature, offset2);
 	  }
       }
       break;
@@ -1593,7 +1597,7 @@
       {
 	ArgBlob *blob = (ArgBlob *)&data[*offset];
 	GIrNodeParam *param = (GIrNodeParam *)node;
-
+	
 	*offset += 8;
 
  	blob->name = write_string (node->name, strings, data, offset2);



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