gobject-introspection r758 - in trunk: . giscanner tests/scanner
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r758 - in trunk: . giscanner tests/scanner
- Date: Mon, 20 Oct 2008 19:09:18 +0000 (UTC)
Author: walters
Date: Mon Oct 20 19:09:17 2008
New Revision: 758
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=758&view=rev
Log:
Also register g variants of default_array_types.
Modified:
trunk/ChangeLog
trunk/giscanner/ast.py
trunk/giscanner/glibast.py
trunk/tests/scanner/foo-1.0-expected.gir
trunk/tests/scanner/foo.h
Modified: trunk/giscanner/ast.py
==============================================================================
--- trunk/giscanner/ast.py (original)
+++ trunk/giscanner/ast.py Mon Oct 20 19:09:17 2008
@@ -123,6 +123,7 @@
# These types, when seen by reference, are converted into an Array()
# by default
+# If you add/change these, be sure to update glibast.py too
default_array_types = {}
default_array_types['uint8*'] = TYPE_UINT8
default_array_types['char**'] = TYPE_STRING
Modified: trunk/giscanner/glibast.py
==============================================================================
--- trunk/giscanner/glibast.py (original)
+++ trunk/giscanner/glibast.py Mon Oct 20 19:09:17 2008
@@ -20,7 +20,7 @@
from .ast import Class, Enum, Interface, Member, Node, Property, Struct, Union
from .ast import (
- type_names,
+ type_names, default_array_types,
TYPE_STRING, TYPE_INT8, TYPE_UINT8, TYPE_INT16, TYPE_UINT16,
TYPE_INT, TYPE_UINT, TYPE_UINT32, TYPE_INT32, TYPE_LONG,
TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_FLOAT,
@@ -55,6 +55,12 @@
type_names['gshort'] = TYPE_INT16
type_names['gushort'] = TYPE_UINT16
+# It's not very nice to duplicate the array types from ast.py,
+# but a clean fix is hard without essentially hardcoding
+# char * again inside transformer.py
+default_array_types['guint8*'] = TYPE_UINT8
+default_array_types['gchar**'] = TYPE_STRING
+
class GLibEnum(Enum):
Modified: trunk/tests/scanner/foo-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-1.0-expected.gir (original)
+++ trunk/tests/scanner/foo-1.0-expected.gir Mon Oct 20 19:09:17 2008
@@ -513,6 +513,19 @@
</parameter>
</parameters>
</function>
+ <function name="test_string_array_with_g"
+ c:identifier="foo_test_string_array_with_g">
+ <return-value>
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="array">
+ <array c:type="gchar**">
+ <type name="utf8"/>
+ </array>
+ </parameter>
+ </parameters>
+ </function>
<constant name="SUCCESS_INT" value="4408">
<type name="int"/>
</constant>
Modified: trunk/tests/scanner/foo.h
==============================================================================
--- trunk/tests/scanner/foo.h (original)
+++ trunk/tests/scanner/foo.h Mon Oct 20 19:09:17 2008
@@ -243,4 +243,6 @@
void foo_test_string_array (char **array);
+void foo_test_string_array_with_g (gchar **array);
+
#endif /* __FOO_OBJECT_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]