gobject-introspection r378 - in trunk: . tests tools
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r378 - in trunk: . tests tools
- Date: Thu, 14 Aug 2008 19:35:36 +0000 (UTC)
Author: johan
Date: Thu Aug 14 19:35:36 2008
New Revision: 378
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=378&view=rev
Log:
2008-08-14 Johan Dahlin <johan gnome org>
* tests/Makefile.am:
* tests/enum.gir:
* tools/generate.c (write_enum_info):
Fix generation of enum/bitfields
Modified:
trunk/ChangeLog
trunk/tests/Makefile.am
trunk/tests/enum.gir
trunk/tools/generate.c
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Thu Aug 14 19:35:36 2008
@@ -18,6 +18,7 @@
GIRTESTS = \
boxed.gir.test \
+ enum.gir.test \
object.gir.test
%.gir.test: %.gir
Modified: trunk/tests/enum.gir
==============================================================================
--- trunk/tests/enum.gir (original)
+++ trunk/tests/enum.gir Thu Aug 14 19:35:36 2008
@@ -4,20 +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">
- <enum name="Enum1" type-name="FooEnum" get-type="foo_enum_get_type">
+ <enumeration name="Enum1" glib:type-name="FooEnum" glib:get-type="foo_enum_get_type">
<member name="value1" value="0" />
<member name="value2" value="1" />
<member name="value3" value="2" />
- </enum>
- <flags name="Flags1" type-name="FooFlags" get-type="foo_flags_get_type">
+ </enumeration>
+ <bitfield name="Flags1" glib:type-name="FooFlags" glib:get-type="foo_flags_get_type">
<member name="value1" value="1" />
<member name="value2" value="2" />
<member name="value3" value="4" />
- </flags>
- <enum name="Enum2">
+ </bitfield>
+ <enumeration name="Enum2">
<member name="value1" value="0" />
<member name="value2" value="1" />
<member name="value3" value="2" />
- </enum>
+ </enumeration>
</namespace>
</repository>
Modified: trunk/tools/generate.c
==============================================================================
--- trunk/tools/generate.c (original)
+++ trunk/tools/generate.c Thu Aug 14 19:35:36 2008
@@ -603,13 +603,13 @@
type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_ENUM)
- g_fprintf (file, " <enum ");
+ g_fprintf (file, " <enumeration ");
else
- g_fprintf (file, " <flags ");
+ g_fprintf (file, " <bitfield ");
g_fprintf (file, "name=\"%s\"", name);
if (type_init)
- g_fprintf (file, " type-name=\"%s\" get-type=\"%s\"", type_name, type_init);
+ g_fprintf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
if (deprecated)
g_fprintf (file, " deprecated=\"1\"");
@@ -624,9 +624,9 @@
}
if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_ENUM)
- g_fprintf (file, " </enum>\n");
+ g_fprintf (file, " </enumeration>\n");
else
- g_fprintf (file, " </flags>\n");
+ g_fprintf (file, " </bitfield>\n");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]