[importer] Struct/union constructors need to take a reference to the GIBaseInfo they...
authorRobert Carr <racarr@gnome.org>
Thu, 17 Dec 2009 22:25:21 +0000 (17:25 -0500)
committerRobert Carr <racarr@gnome.org>
Thu, 17 Dec 2009 22:25:21 +0000 (17:25 -0500)
libseed/seed-importer.c
libseed/seed-structs.c

index 339ab8d..f205df1 100644 (file)
@@ -246,7 +246,8 @@ seed_gi_importer_handle_struct (JSContextRef ctx,
   GIFunctionInfo *finfo;
 
   struct_ref = JSObjectMake (ctx, seed_struct_constructor_class, info);
-
+  g_base_info_ref (info);
+  
   n_methods = g_struct_info_get_n_methods (info);
 
   for (i = 0; i < n_methods; i++)
@@ -295,6 +296,7 @@ seed_gi_importer_handle_union (JSContextRef ctx,
   GIFunctionInfo *finfo;
 
   union_ref = JSObjectMake (ctx, seed_struct_constructor_class, info);
+  g_base_info_ref (info);
 
   n_methods = g_union_info_get_n_methods (info);
 
index 8ca9067..42b5d52 100644 (file)
@@ -508,7 +508,7 @@ seed_union_prototype (JSContextRef ctx, GIBaseInfo * info)
   key = g_strjoin (NULL, namespace, name, NULL);
 
   proto = (JSObjectRef) g_hash_table_lookup (union_prototype_hash, key);
-
+  
   if (!proto)
     {
       proto = JSObjectMake (ctx, 0, 0);