[seed] [importer] Struct/union constructors need to take a reference to the GIBaseInfo they store in their



commit c5c4352f77624d4717f4757c87ff7e1373082dc3
Author: Robert Carr <racarr gnome org>
Date:   Thu Dec 17 17:25:21 2009 -0500

    [importer] Struct/union constructors need to take a reference to the GIBaseInfo they store in their privates...

 libseed/seed-importer.c |    4 +++-
 libseed/seed-structs.c  |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libseed/seed-importer.c b/libseed/seed-importer.c
index 339ab8d..f205df1 100644
--- a/libseed/seed-importer.c
+++ b/libseed/seed-importer.c
@@ -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);
 
diff --git a/libseed/seed-structs.c b/libseed/seed-structs.c
index 8ca9067..42b5d52 100644
--- a/libseed/seed-structs.c
+++ b/libseed/seed-structs.c
@@ -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);



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