gobject-introspection r668 - in trunk: . giscanner tests/scanner



Author: lucasr
Date: Sat Oct 11 21:32:19 2008
New Revision: 668
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=668&view=rev

Log:
2008-10-11  Lucas Rocha  <lucasr gnome org>

	Bug 552370: add one more test for unsigned as a type, not as
	a type qualifier.

	* giscanner/ast.py: add 'uint' type name for 'unsigned'.
	* test/scanner/foo.h: add function which uses unsigned as a type.
	* test/scanner/foo-expected.gir: test that.


Modified:
   trunk/ChangeLog
   trunk/giscanner/ast.py
   trunk/tests/scanner/foo-expected.gir
   trunk/tests/scanner/foo.h

Modified: trunk/giscanner/ast.py
==============================================================================
--- trunk/giscanner/ast.py	(original)
+++ trunk/giscanner/ast.py	Sat Oct 11 21:32:19 2008
@@ -89,6 +89,7 @@
 type_names['unsigned short'] = TYPE_UINT16
 type_names['int'] = TYPE_INT
 type_names['unsigned int'] = TYPE_UINT
+type_names['unsigned'] = TYPE_UINT
 type_names['long'] = TYPE_LONG
 type_names['unsigned long'] = TYPE_ULONG
 type_names['float'] = TYPE_FLOAT

Modified: trunk/tests/scanner/foo-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-expected.gir	(original)
+++ trunk/tests/scanner/foo-expected.gir	Sat Oct 11 21:32:19 2008
@@ -448,7 +448,8 @@
         </return-value>
       </method>
     </union>
-    <function name="test_unsigned" c:identifier="foo_test_unsigned">
+    <function name="test_unsigned_qualifier"
+              c:identifier="foo_test_unsigned_qualifier">
       <return-value>
         <type name="none" c:type="void"/>
       </return-value>
@@ -458,5 +459,15 @@
         </parameter>
       </parameters>
     </function>
+    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
+      <return-value>
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="unsigned_param">
+          <type name="uint" c:type="unsigned"/>
+        </parameter>
+      </parameters>
+    </function>
   </namespace>
 </repository>

Modified: trunk/tests/scanner/foo.h
==============================================================================
--- trunk/tests/scanner/foo.h	(original)
+++ trunk/tests/scanner/foo.h	Sat Oct 11 21:32:19 2008
@@ -227,6 +227,7 @@
 
 int foo_bunion_get_contained_type (FooBUnion *bunion);
 
-void foo_test_unsigned (unsigned int unsigned_param);
+void foo_test_unsigned_qualifier (unsigned int unsigned_param);
+void foo_test_unsigned_type (unsigned unsigned_param);
 
 #endif /* __FOO_OBJECT_H__ */



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