[pygobject] Revert "Mark caller-allocated boxed structures as having a slice allocated"



commit 70118c3840b10e1585d066a4be485c097cd23e99
Author: Martin Pitt <martinpitt gnome org>
Date:   Wed Feb 27 21:52:43 2013 +0100

    Revert "Mark caller-allocated boxed structures as having a slice allocated"
    
    This is wrong after all, as it sets slice_allocated to TRUE, but doesn't set a
    corresponding size. Also, poking in internal fields from that place is ugly;
    this should rather be fixed in gi/pygi-marshal-cleanup.c
    _cleanup_caller_allocates().
    
    This reverts commit dc3d21173b75232f7ea0b9913f7309486456a69d.

 gi/pygi-marshal-to-py.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c
index 172561d..661befc 100644
--- a/gi/pygi-marshal-to-py.c
+++ b/gi/pygi-marshal-to-py.c
@@ -815,9 +815,7 @@ _pygi_marshal_to_py_interface_struct (PyGIInvokeState   *state,
                                                               arg->v_pointer);
     } else if (g_type_is_a (type, G_TYPE_BOXED)) {
         py_obj = _pygi_boxed_new ( (PyTypeObject *)iface_cache->py_type, arg->v_pointer, 
-                                  arg_cache->transfer == GI_TRANSFER_EVERYTHING || 
arg_cache->is_caller_allocates);
-        if (arg_cache->is_caller_allocates)
-          ((PyGIBoxed *)py_obj)->slice_allocated = TRUE;
+                                  arg_cache->transfer == GI_TRANSFER_EVERYTHING);
     } else if (g_type_is_a (type, G_TYPE_POINTER)) {
         if (iface_cache->py_type == NULL ||
                 !PyType_IsSubtype ( (PyTypeObject *)iface_cache->py_type, &PyGIStruct_Type)) {


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