seed r298 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r298 - trunk/libseed
- Date: Sat, 22 Nov 2008 02:23:51 +0000 (UTC)
Author: racarr
Date: Sat Nov 22 02:23:51 2008
New Revision: 298
URL: http://svn.gnome.org/viewvc/seed?rev=298&view=rev
Log:
Fix nested struct in addition to nested union.
Modified:
trunk/libseed/seed-structs.c
Modified: trunk/libseed/seed-structs.c
==============================================================================
--- trunk/libseed/seed-structs.c (original)
+++ trunk/libseed/seed-structs.c Sat Nov 22 02:23:51 2008
@@ -191,12 +191,41 @@
if (!g_field_info_get_field(field, priv->pointer,
&field_value))
{
+ GITypeTag tag;
+
+ tag = g_type_info_get_tag(field_type);
+ if (tag == GI_TYPE_TAG_INTERFACE)
+ {
+ GIBaseInfo * interface;
+
+ interface = g_type_info_get_interface(field_type);
+ gint offset = g_field_info_get_offset(field);
+ switch (g_base_info_get_type(interface))
+ {
+ case GI_INFO_TYPE_STRUCT:
+ ret = seed_make_struct((priv->pointer + offset),
+ interface);
+ goto found;
+ case GI_INFO_TYPE_UNION:
+ ret = seed_make_union((priv->pointer + offset),
+ interface);
+ goto found;
+ case GI_INFO_TYPE_BOXED:
+ ret = seed_make_boxed((priv->pointer + offset),
+ interface);
+ goto found;
+ default:
+ g_base_info_unref(interface);
+ }
+ }
+
g_free(cproperty_name);
return JSValueMakeNull(eng->context);
}
ret = seed_gi_argument_make_js(&field_value,
field_type, exception);
+found:
g_base_info_unref((GIBaseInfo *) field);
if (field_type)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]