gjs r127 - trunk/gi



Author: jobi
Date: Tue Dec  2 16:11:34 2008
New Revision: 127
URL: http://svn.gnome.org/viewvc/gjs?rev=127&view=rev

Log:
gi/arg.c: do not treat closures as Struct

We have a special case for these.

Modified:
   trunk/gi/arg.c

Modified: trunk/gi/arg.c
==============================================================================
--- trunk/gi/arg.c	(original)
+++ trunk/gi/arg.c	Tue Dec  2 16:11:34 2008
@@ -446,7 +446,9 @@
                 arg->v_pointer = NULL;
             } else if (JSVAL_IS_OBJECT(value)) {
                 /* Handle Struct/Union first since we don't necessarily need a GType for them */
-                if (symbol_type == GI_INFO_TYPE_STRUCT || symbol_type == GI_INFO_TYPE_BOXED) {
+                if ((symbol_type == GI_INFO_TYPE_STRUCT || symbol_type == GI_INFO_TYPE_BOXED) &&
+                    /* We special case Closures later, so skip them here */
+                    !g_type_is_a(gtype, G_TYPE_CLOSURE)) {
                     arg->v_pointer = gjs_c_struct_from_boxed(context,
                                                              JSVAL_TO_OBJECT(value));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]