gjs r8 - trunk/gi
- From: lucasr svn gnome org
- To: svn-commits-list gnome org
- Subject: gjs r8 - trunk/gi
- Date: Sun, 12 Oct 2008 14:24:18 +0000 (UTC)
Author: lucasr
Date: Sun Oct 12 14:24:18 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/gjs?rev=8&view=rev
Log:
Define union, struct and boxed the same way now. This should probably change
after we add support for accessing fields.
Modified:
trunk/gi/boxed.c
trunk/gi/repo.c
Modified: trunk/gi/boxed.c
==============================================================================
--- trunk/gi/boxed.c (original)
+++ trunk/gi/boxed.c Sun Oct 12 14:24:18 2008
@@ -534,7 +534,12 @@
return NULL;
}
- if (g_base_info_get_type( (GIBaseInfo*) info) != GI_INFO_TYPE_BOXED) {
+ /* FIXME: we're basically treating union, struct and boxes the same
+ * way. This should be split when we eventually add support for
+ * accessing fields in union and struct. */
+ if (g_base_info_get_type( (GIBaseInfo*) info) != GI_INFO_TYPE_BOXED &&
+ g_base_info_get_type( (GIBaseInfo*) info) != GI_INFO_TYPE_STRUCT &&
+ g_base_info_get_type( (GIBaseInfo*) info) != GI_INFO_TYPE_UNION) {
gjs_throw(context,
"GType %s doesn't map to boxed in g-i?",
g_base_info_get_name( (GIBaseInfo*) info));
Modified: trunk/gi/repo.c
==============================================================================
--- trunk/gi/repo.c (original)
+++ trunk/gi/repo.c Sun Oct 12 14:24:18 2008
@@ -418,6 +418,8 @@
if (!gjs_define_object_class(context, in_object, G_TYPE_INVALID, (GIObjectInfo*) info, NULL, NULL))
return JS_FALSE;
break;
+ case GI_INFO_TYPE_STRUCT:
+ case GI_INFO_TYPE_UNION:
case GI_INFO_TYPE_BOXED:
if (!gjs_define_boxed_class(context, in_object, (GIBoxedInfo*) info, NULL, NULL))
return JS_FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]