seed r356 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r356 - trunk/libseed
- Date: Thu, 27 Nov 2008 04:04:45 +0000 (UTC)
Author: racarr
Date: Thu Nov 27 04:04:45 2008
New Revision: 356
URL: http://svn.gnome.org/viewvc/seed?rev=356&view=rev
Log:
Update seed_value_is_gobject...everything is pretty much global context free now.
Modified:
   trunk/libseed/seed-types.c
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c	(original)
+++ trunk/libseed/seed-types.c	Thu Nov 27 04:04:45 2008
@@ -29,13 +29,14 @@
 JSClassRef seed_callback_class;
 SeedEngine *eng;
 
-static gboolean seed_value_is_gobject(JSValueRef value)
+static gboolean seed_value_is_gobject(JSContextRef ctx,
+									  JSValueRef value)
 {
-	if (!JSValueIsObject(eng->context, value) ||
-		JSValueIsNull(eng->context, value))
+	if (!JSValueIsObject(ctx, value) ||
+		JSValueIsNull(ctx, value))
 		return FALSE;
 
-	return JSValueIsObjectOfClass(eng->context, value, gobject_class);
+	return JSValueIsObjectOfClass(ctx, value, gobject_class);
 }
 
 void seed_toggle_ref(gpointer data, GObject * object, gboolean is_last_ref)
@@ -771,7 +772,7 @@
 	}
 	else if (g_type_is_a(type, G_TYPE_OBJECT)
 			 && (JSValueIsNull(ctx, val)
-				 || seed_value_is_gobject(val)))
+				 || seed_value_is_gobject(ctx, val)))
 	{
 		GObject *o = seed_value_to_object(ctx,
 										  val, exception);
@@ -1207,7 +1208,7 @@
 	   needs testing at higher level if value can be null (through GI) */
 	if (JSValueIsNull(ctx, val))
 		return 0;
-	if (!seed_value_is_gobject(val))
+	if (!seed_value_is_gobject(ctx, val))
 	{
 		seed_make_exception(ctx, exception, "ConversionError",
 							"Attempt to convert from"
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]