[seed] libseed: Propogate the GIArgInfo through the native closure privates



commit eb2e927bdbbcbc18e161cae0346c67e5300d8141
Author: Robert Carr <racarr svn gnome org>
Date:   Fri May 29 05:13:35 2009 -0400

    libseed: Propogate the GIArgInfo through the native closure privates
---
 libseed/seed-closure.c |    6 +++++-
 libseed/seed-closure.h |    2 ++
 libseed/seed-types.c   |    1 +
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/libseed/seed-closure.c b/libseed/seed-closure.c
index a9182f9..2ebdfd5 100644
--- a/libseed/seed-closure.c
+++ b/libseed/seed-closure.c
@@ -34,6 +34,7 @@ seed_closure_finalize (JSObjectRef object)
   g_free (privates->cif);
   g_callable_info_free_closure (privates->info, privates->closure);
   g_base_info_unref ((GIBaseInfo *) privates->info);
+  g_base_info_unref ((GIBaseInfo *) privates->arg_info);
   
   JSValueUnprotect (eng->context, object);
 }
@@ -273,7 +274,9 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
 
 SeedNativeClosure *
 seed_make_native_closure (JSContextRef ctx,
-			  GICallableInfo * info, JSValueRef function)
+			  GICallableInfo * info, 
+			  GIArgInfo *arg_info, 
+			  JSValueRef function)
 {
   ffi_cif *cif;
   ffi_closure *closure;
@@ -299,6 +302,7 @@ seed_make_native_closure (JSContextRef ctx,
 
   privates = g_new0 (SeedNativeClosure, 1);
   privates->info = (GICallableInfo *) g_base_info_ref ((GIBaseInfo *) info);
+  privates->arg_info = (GIArgInfo *) g_base_info_ref ((GIBaseInfo *) arg_info);
   privates->function = function;
   privates->cif = cif;
 
diff --git a/libseed/seed-closure.h b/libseed/seed-closure.h
index 165ab4c..bd70d6c 100644
--- a/libseed/seed-closure.h
+++ b/libseed/seed-closure.h
@@ -38,6 +38,7 @@ typedef struct _SeedClosure
 typedef struct _SeedNativeClosure
 {
   GICallableInfo *info;
+  GIArgInfo *arg_info;
   JSValueRef function;
 
   ffi_closure *closure;
@@ -48,6 +49,7 @@ extern JSClassRef seed_native_callback_class;
 
 SeedNativeClosure *seed_make_native_closure (JSContextRef ctx,
 					     GICallableInfo * info,
+					     GIArgInfo *arg_info,
 					     JSValueRef function);
 GClosure *seed_closure_new (JSContextRef ctx,
 			    JSObjectRef function, 
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 56797cf..f8c5ff1 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -691,6 +691,7 @@ seed_gi_make_argument (JSContextRef ctx,
 	      {
 		SeedNativeClosure *privates = seed_make_native_closure (ctx,
 									(GICallableInfo *) interface,
+									arg_info,
 									value);
 		arg->v_pointer = privates->closure;
 		g_base_info_unref (interface);



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