GType can be bigger than int32; use seed_value_to_long for now
authorTim Horton <hortont424@gmail.com>
Mon, 4 Jan 2010 03:11:03 +0000 (22:11 -0500)
committerTim Horton <hortont424@gmail.com>
Mon, 4 Jan 2010 03:11:03 +0000 (22:11 -0500)
This is probably not correct, since the size of the type is variable, and all...

libseed/seed-gtype.c

index 839e689..4812cb8 100644 (file)
@@ -906,7 +906,8 @@ seed_gtype_constructor_invoked (JSContextRef ctx,
     }
 
 
-  parent_type = (GType) seed_value_to_int (ctx, parent_ref, exception);
+  // TODO: GType is of variable length, so this is an incorrect fix
+  parent_type = (GType) seed_value_to_long (ctx, parent_ref, exception);
 
   SEED_NOTE (GTYPE, "Registering new GType with name: %s as child of %s.",
             new_name, g_type_name (parent_type));