[pygobject/invoke-rewrite] [gi-invoke-ng] only cache caller allocates for interfaces as some API are broken



commit 05ed688d54e3ff04e961b60d0b5d3ed0b97c771d
Author: John (J5) Palmieri <johnp redhat com>
Date:   Wed Jun 22 12:26:39 2011 -0400

    [gi-invoke-ng] only cache caller allocates for interfaces as some API are broken

 gi/pygi-cache.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 65229eb..bf7ac1b 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -1289,7 +1289,7 @@ _args_cache_generate (GICallableInfo *callable_info,
         GIDirection direction;
         GITransfer transfer;
         GITypeTag type_tag;
-        gboolean is_caller_allocates;
+        gboolean is_caller_allocates = FALSE;
         gint py_arg_index = -1;
 
         arg_info =
@@ -1299,7 +1299,9 @@ _args_cache_generate (GICallableInfo *callable_info,
         transfer = g_arg_info_get_ownership_transfer (arg_info);
         type_info = g_arg_info_get_type (arg_info);
         type_tag = g_type_info_get_tag (type_info);
-        is_caller_allocates = g_arg_info_is_caller_allocates (arg_info);
+
+        if (type_tag == GI_TYPE_TAG_INTERFACE)
+            is_caller_allocates = g_arg_info_is_caller_allocates (arg_info);
 
         /* must be an aux arg filled in by its owner
          * fill in it's c_arg_index, add to the in count



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