gobject-introspection r635 - in trunk: giscanner tests/scanner



Author: walters
Date: Mon Sep 29 19:03:40 2008
New Revision: 635
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=635&view=rev

Log:
Make length= work


Modified:
   trunk/giscanner/transformer.py
   trunk/tests/scanner/annotation-expected.gir

Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py	(original)
+++ trunk/giscanner/transformer.py	Mon Sep 29 19:03:40 2008
@@ -366,6 +366,9 @@
                 param.transfer = True
             elif option == 'notransfer':
                 param.transfer = False
+            elif isinstance(ptype, Array) and option.startswith('length'):
+                (_, index) = option.split('=')
+                ptype.length_param_index = int(index)
             elif option == 'allow-none':
                 param.allow_none = True
             else:

Modified: trunk/tests/scanner/annotation-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-expected.gir	(original)
+++ trunk/tests/scanner/annotation-expected.gir	Mon Sep 29 19:03:40 2008
@@ -208,7 +208,7 @@
           <type name="Object" c:type="AnnotationObject*"/>
         </parameter>
         <parameter name="nums">
-          <type name="int[]" c:type="int*"/>
+          <type name="int[length=2]" c:type="int*"/>
         </parameter>
         <parameter name="n_nums">
           <type name="int" c:type="int"/>



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