gobject-introspection r628 - in trunk: girepository giscanner tests/invoke tests/scanner



Author: walters
Date: Thu Sep 25 22:33:57 2008
New Revision: 628
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=628&view=rev

Log:
Remove non-repository types from GIR

	* giscanner/ast.py: The canonical name is 'utf8', not
	'string'.
	* giscanner/glibast.py: A few more glib type mappings.
	* girepository/girparser.c: We only parse repository types.
	* tests/*.gir: Update.


Modified:
   trunk/girepository/girparser.c
   trunk/giscanner/ast.py
   trunk/giscanner/glibast.py
   trunk/tests/invoke/testfns.gir
   trunk/tests/scanner/annotation-expected.gir
   trunk/tests/scanner/foo-expected.gir

Modified: trunk/girepository/girparser.c
==============================================================================
--- trunk/girepository/girparser.c	(original)
+++ trunk/girepository/girparser.c	Thu Sep 25 22:33:57 2008
@@ -255,44 +255,6 @@
     { "time_t",   GI_TYPE_TAG_TIME_T,  0 },
     { "utf8",     GI_TYPE_TAG_UTF8,    1 },  
     { "filename", GI_TYPE_TAG_FILENAME,1 },
-
-    /* FIXME: merge - do we still want this? */
-    { "string",   GI_TYPE_TAG_UTF8,  1 },
-
-    /* FIXME: Remove these */
-    { "void",     GI_TYPE_TAG_VOID,    0 },
-    { "int8_t",   GI_TYPE_TAG_INT8,    0 },
-    { "uint8_t",  GI_TYPE_TAG_UINT8,   0 },
-    { "int16_t",  GI_TYPE_TAG_INT16,   0 },
-    { "uint16_t", GI_TYPE_TAG_UINT16,  0 },
-    { "int32_t",  GI_TYPE_TAG_INT32,   0 },
-    { "uint32_t", GI_TYPE_TAG_UINT32,  0 },
-    { "int64_t",  GI_TYPE_TAG_INT64,   0 },
-    { "uint64_t", GI_TYPE_TAG_UINT64,  0 },
-    { "gpointer", GI_TYPE_TAG_VOID,    1 },
-    { "gboolean", GI_TYPE_TAG_BOOLEAN, 0 },
-    { "gchar",    GI_TYPE_TAG_INT8,    0 },
-    { "guchar",   GI_TYPE_TAG_UINT8,   0 },
-    { "gunichar", GI_TYPE_TAG_UINT32,  0 },
-    { "gint",     GI_TYPE_TAG_INT,     0 },
-    { "guint",    GI_TYPE_TAG_UINT,    0 },
-    { "gshort",   GI_TYPE_TAG_INT16,   0 },
-    { "gushort",  GI_TYPE_TAG_UINT16,  0 },
-    { "gint8",    GI_TYPE_TAG_INT8,    0 },
-    { "guint8",   GI_TYPE_TAG_UINT8,   0 },
-    { "gint16",   GI_TYPE_TAG_INT16,   0 },
-    { "guint16",  GI_TYPE_TAG_UINT16,  0 },
-    { "gint32",   GI_TYPE_TAG_INT32,   0 },
-    { "guint32",  GI_TYPE_TAG_UINT32,  0 },
-    { "gint64",   GI_TYPE_TAG_INT64,   0 },
-    { "guint64",  GI_TYPE_TAG_UINT64,  0 },
-    { "glong",    GI_TYPE_TAG_LONG,    0 },
-    { "gulong",   GI_TYPE_TAG_ULONG,   0 },
-    { "gssize",   GI_TYPE_TAG_SSIZE,   0 },
-    { "gsize",    GI_TYPE_TAG_SIZE,    0 },
-    { "gfloat",   GI_TYPE_TAG_FLOAT,   0 },
-    { "gdouble",  GI_TYPE_TAG_DOUBLE,  0 },
-    { "gchar*",   GI_TYPE_TAG_UTF8,    1 }
 };  
 
 static const BasicTypeInfo *

Modified: trunk/giscanner/ast.py
==============================================================================
--- trunk/giscanner/ast.py	(original)
+++ trunk/giscanner/ast.py	Thu Sep 25 22:33:57 2008
@@ -50,7 +50,7 @@
 TYPE_TIMET = 'time_t'
 TYPE_FLOAT = 'float'
 TYPE_DOUBLE = 'double'
-TYPE_STRING = 'string' # requires zero-terminated
+TYPE_STRING = 'utf8' # requires zero-terminated
 TYPE_FILENAME = 'filename'
 
 BASIC_GIR_TYPES = [TYPE_BOOLEAN, TYPE_INT8, TYPE_UINT8, TYPE_INT16,

Modified: trunk/giscanner/glibast.py
==============================================================================
--- trunk/giscanner/glibast.py	(original)
+++ trunk/giscanner/glibast.py	Thu Sep 25 22:33:57 2008
@@ -50,6 +50,7 @@
 type_names['gconstpointer'] = TYPE_ANY
 type_names['gsize'] = TYPE_SIZET
 type_names['gssize'] = TYPE_SSIZET
+type_names['gchar'] = TYPE_INT8
 type_names['guchar'] = TYPE_UINT8
 type_names['gshort'] = TYPE_INT16
 type_names['gushort'] = TYPE_UINT16

Modified: trunk/tests/invoke/testfns.gir
==============================================================================
--- trunk/tests/invoke/testfns.gir	(original)
+++ trunk/tests/invoke/testfns.gir	Thu Sep 25 22:33:57 2008
@@ -17,7 +17,7 @@
 
     <function name="test2" c:identifier="test2">
       <return-value>
-        <type name="void" c:type="void"/>
+        <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="in" c:type="gint" direction="in">
@@ -31,7 +31,7 @@
 
     <function name="test3" c:identifier="test3">
       <return-value>
-        <type name="void" c:type="void"/>
+        <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="inout" c:type="gint" direction="inout">
@@ -42,7 +42,7 @@
 
     <function name="test4" c:identifier="test4">
       <return-value>
-        <type name="void" c:type="void"/>
+        <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="blurb" direction="in">
@@ -53,7 +53,7 @@
 
     <function name="test5" c:identifier="test5">
       <return-value>
-        <type name="void" c:type="void"/>
+        <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="blurb" direction="out" transfer="full">
@@ -71,7 +71,7 @@
       </return-value>
       <parameters>
         <parameter name="list" direction="in">
-          <type name="GLib.List<gint>*" c:type="GList*"/>
+          <type name="GLib.List<int>*" c:type="GList*"/>
         </parameter>
       </parameters>
     </function>
@@ -90,7 +90,7 @@
 
     <function name="broken" c:identifier="broken">
       <return-value>
-         <type name="void" c:type="void"/>
+         <type name="none" c:type="void"/>
       </return-value>
     </function>
 

Modified: trunk/tests/scanner/annotation-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-expected.gir	(original)
+++ trunk/tests/scanner/annotation-expected.gir	Thu Sep 25 22:33:57 2008
@@ -61,7 +61,7 @@
           <type name="Object" c:type="AnnotationObject*"/>
         </parameter>
         <parameter name="allow_none" allow-none="1">
-          <type name="string" c:type="gchar*"/>
+          <type name="utf8" c:type="gchar*"/>
         </parameter>
       </parameters>
     </function>
@@ -152,7 +152,7 @@
               c:identifier="annotation_object_get_strings">
       <return-value>
         <type name="GLib.List" transfer-ownership="1">
-          <type name="string" relation="element"/>
+          <type name="utf8" relation="element"/>
         </type>
       </return-value>
       <parameters>

Modified: trunk/tests/scanner/foo-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-expected.gir	(original)
+++ trunk/tests/scanner/foo-expected.gir	Thu Sep 25 22:33:57 2008
@@ -99,7 +99,7 @@
             <type name="Object" c:type="FooObject*"/>
           </parameter>
           <parameter name="target">
-            <type name="string" c:type="char*"/>
+            <type name="utf8" c:type="char*"/>
           </parameter>
         </parameters>
       </method>
@@ -117,7 +117,7 @@
         </parameters>
       </method>
       <property name="string" writable="1">
-        <type name="string" c:type="gchararray"/>
+        <type name="utf8" c:type="gchararray"/>
       </property>
       <callback name="virtual_method" c:type="virtual_method">
         <return-value>
@@ -134,7 +134,7 @@
       </callback>
       <glib:signal name="signal">
         <return-value>
-          <type name="string" c:type="gchararray"/>
+          <type name="utf8" c:type="gchararray"/>
         </return-value>
         <parameters>
           <parameter name="object">



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