gobject-introspection r379 - in trunk: . tests tools
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r379 - in trunk: . tests tools
- Date: Thu, 14 Aug 2008 19:45:37 +0000 (UTC)
Author: johan
Date: Thu Aug 14 19:45:37 2008
New Revision: 379
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=379&view=rev
Log:
2008-08-14 Johan Dahlin <johan gnome org>
* tests/Makefile.am:
* tests/constant.gir:
* tests/gobject.gir:
* tests/struct.gir:
* tools/generate.c (write_struct_info):
Fix generator for constant/gobject/struct
Modified:
trunk/ChangeLog
trunk/tests/Makefile.am
trunk/tests/constant.gir
trunk/tests/gobject.gir
trunk/tests/interface.gir
trunk/tests/struct.gir
trunk/tools/generate.c
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Thu Aug 14 19:45:37 2008
@@ -3,7 +3,6 @@
EXTRA_DIST = \
array.gir \
boxed.gir \
- constant.gir \
enum.gir \
errors.gir \
function.gir \
@@ -16,10 +15,13 @@
xref1.gir \
xref2.gir
-GIRTESTS = \
- boxed.gir.test \
- enum.gir.test \
- object.gir.test
+GIRTESTS = \
+ boxed.gir.test \
+ constant.gir.test \
+ enum.gir.test \
+ gobject.gir.test \
+ object.gir.test \
+ struct.gir.test
%.gir.test: %.gir
@echo Testing $<:
Modified: trunk/tests/constant.gir
==============================================================================
--- trunk/tests/constant.gir (original)
+++ trunk/tests/constant.gir Thu Aug 14 19:45:37 2008
@@ -4,10 +4,20 @@
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<namespace name="Foo">
- <constant name="constant1" type="gint" value="42" />
- <constant name="constant2" type="guint" value="42" />
- <constant name="constant3" type="guint64" value="42" />
- <constant name="constant4" type="gint32" value="42" />
- <constant name="constant5" type="gfloat" value="42.000000" />
+ <constant name="constant1" value="42">
+ <type name="int"/>
+ </constant>
+ <constant name="constant2" value="42">
+ <type name="uint"/>
+ </constant>
+ <constant name="constant3" value="42">
+ <type name="int64"/>
+ </constant>
+ <constant name="constant4" value="42">
+ <type name="int32"/>
+ </constant>
+ <constant name="constant5" value="42.000000">
+ <type name="float"/>
+ </constant>
</namespace>
</repository>
Modified: trunk/tests/gobject.gir
==============================================================================
--- trunk/tests/gobject.gir (original)
+++ trunk/tests/gobject.gir Thu Aug 14 19:45:37 2008
@@ -4,7 +4,7 @@
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<namespace name="GObject">
- <object name="GObject" type-name="GObject" get-type="g_object_get_type">
- </object>
+ <class name="GObject" glib:type-name="GObject" glib:get-type="g_object_get_type">
+ </class>
</namespace>
</repository>
Modified: trunk/tests/interface.gir
==============================================================================
--- trunk/tests/interface.gir (original)
+++ trunk/tests/interface.gir Thu Aug 14 19:45:37 2008
@@ -4,38 +4,58 @@
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<namespace name="Foo">
- <interface name="Iface1" type-name="Iface1" get-type="iface1_get_type">
+ <interface name="Iface1" glib:type-name="Iface1" glib:get-type="iface1_get_type">
<requires>
- <interface name="Iface2" />
+ <interface name="Iface2" />
</requires>
<method name="method1" symbol="method1">
- <return-type type="Iface2*" transfer="full" />
+ <return-value transfer="full">
+ <type name="Iface2*"/>
+ </return-value>
<parameters>
- <parameter name="param1" type="Iface2*" transfer="full" direction="in" />
+ <parameter name="param1" transfer="full" direction="in">
+ <type name="Iface2*"/>
+ </parameter>
</parameters>
</method>
- <property name="prop1" readable="0" writable="0" type="gint" />
- <signal name="signal1" when="LAST">
- <return-type type="gboolean" />
+ <property name="prop1" readable="0" writable="0">
+ <type name="int"/>
+ </property>
+ <glib:signal name="signal1" when="LAST">
+ <return-value transfer="full">
+ <type name="boolean"/>
+ </return-value>
<parameters>
- <parameter name="obj" type="Iface1*" transfer="full" direction="in" />
+ <parameter name="obj" transfer="full" direction="in">
+ <type name="Iface2*"/>
+ </parameter>
</parameters>
- </signal>
- <signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1">
- <return-type type="void" />
+ </glib:signal>
+ <glib:signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1">
+ <return-value transfer="full">
+ <type name="none"/>
+ </return-value>
<parameters>
- <parameter name="obj" type="Iface1*" transfer="full" direction="in" />
+ <parameter name="obj" transfer="full" direction="in">
+ <type name="Iface1*"/>
+ </parameter>
</parameters>
- </signal>
+ </glib:signal>
<vfunc name="vfunc1" offset="10">
- <return-type type="Iface2*" transfer="full" />
+ <return-value transfer="full">
+ <type name="Iface2*"/>
+ </return-value>
<parameters>
- <parameter name="param1" type="Iface2*" transfer="full" direction="in" />
+ <parameter name="param1" transfer="full" direction="in">
+ <type name="Iface2*"/>
+ </parameter>
</parameters>
</vfunc>
- <constant name="constant1" type="gint" value="42" />
+ <constant name="constant1" value="42">
+ <type name="gint"/>
+ </constant>
</interface>
- <interface name="Iface2" type-name="Iface2" get-type="iface2_get_type">
+ <interface name="Iface2" glib:type-name="Iface2" glib:get-type="iface2_get_type">
</interface>
</namespace>
</repository>
Modified: trunk/tests/struct.gir
==============================================================================
--- trunk/tests/struct.gir (original)
+++ trunk/tests/struct.gir Thu Aug 14 19:45:37 2008
@@ -4,16 +4,30 @@
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<namespace name="Foo">
- <struct name="FooStruct">
- <field name="foo_int" readable="1" writable="1" offset="0" type="gint" />
- <field name="foo_int64" readable="1" writable="1" offset="4" type="gint64" />
- <field name="foo_uint" readable="1" writable="1" offset="12" type="gint" />
- <field name="foo_uint64" readable="1" writable="1" offset="16" type="gint64" />
- <field name="string" readable="1" writable="1" offset="24" type="utf8" />
- </struct>
- <struct name="FooStruct2">
- <field name="sub" readable="1" writable="1" offset="0" type="FooStruct" />
- <field name="string" readable="1" writable="1" offset="24" type="utf8" />
- </struct>
+ <record name="FooStruct">
+ <field name="foo_int" readable="1" writable="1" offset="0">
+ <type name="int"/>
+ </field>
+ <field name="foo_int64" readable="1" writable="1" offset="4">
+ <type name="int64"/>
+ </field>
+ <field name="foo_uint" readable="1" writable="1" offset="12">
+ <type name="uint"/>
+ </field>
+ <field name="foo_uint64" readable="1" writable="1" offset="16">
+ <type name="uint64"/>
+ </field>
+ <field name="string" readable="1" writable="1" offset="24">
+ <type name="utf8"/>
+ </field>
+ </record>
+ <record name="FooStruct2">
+ <field name="sub" readable="1" writable="1" offset="0">
+ <type name="FooStruct"/>
+ </field>
+ <field name="string" readable="1" writable="1" offset="24">
+ <type name="utf8"/>
+ </field>
+ </record>
</namespace>
</repository>
Modified: trunk/tools/generate.c
==============================================================================
--- trunk/tools/generate.c (original)
+++ trunk/tools/generate.c Thu Aug 14 19:45:37 2008
@@ -434,7 +434,7 @@
g_fprintf (file, " <glib:boxed glib:name=\"%s\" glib:type-name=\"%s\" glib:get-type=\"%s\"", name, type_name, type_init);
}
else
- g_fprintf (file, " <struct name=\"%s\"", name);
+ g_fprintf (file, " <record name=\"%s\"", name);
if (deprecated)
g_fprintf (file, " deprecated=\"1\"");
@@ -458,7 +458,7 @@
if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_BOXED)
g_fprintf (file, " </glib:boxed>\n");
else
- g_fprintf (file, " </struct>\n");
+ g_fprintf (file, " </record>\n");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]