[pygobject] Dont try to guess the transfer if its a boxed



commit 017680c9a5e163021628bf29543598861a3b600a
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Tue Jan 18 10:20:25 2011 +0100

    Dont try to guess the transfer if its a boxed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639823

 gi/pygi-invoke.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index e0b365a..a92c68e 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -806,13 +806,16 @@ _process_invocation_state (struct invocation_state *state,
                 if (type_tag == GI_TYPE_TAG_INTERFACE) {
                     GIBaseInfo *info;
                     GIInfoType info_type;
+                    GType type;
 
                     info = g_type_info_get_interface (state->arg_type_infos[i]);
                     g_assert (info != NULL);
                     info_type = g_base_info_get_type (info);
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
 
                     if ( (info_type == GI_INFO_TYPE_STRUCT) &&
-                             !g_struct_info_is_foreign((GIStructInfo *) info) ) {
+                             !g_struct_info_is_foreign((GIStructInfo *) info) &&
+                             !g_type_is_a (type, G_TYPE_BOXED)) {
                         if (g_arg_info_is_caller_allocates (state->arg_infos[i])) {
                             transfer = GI_TRANSFER_EVERYTHING;
                         } else if (transfer == GI_TRANSFER_EVERYTHING) {



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