[pygobject] Revert "to python struct marshalling: copy boxed during cleanup"
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Revert "to python struct marshalling: copy boxed during cleanup"
- Date: Tue, 13 Feb 2018 23:05:40 +0000 (UTC)
commit 10c062001ddd948b0a70545cbf613b38ed6fa46c
Author: Christoph Reiter <reiter christoph gmail com>
Date: Tue Feb 13 23:09:49 2018 +0100
Revert "to python struct marshalling: copy boxed during cleanup"
This reverts commit 7ed8191818733b9130bce84f782dc6f8f734abf7.
gi/pygi-struct-marshal.c | 34 +++++++---------------------------
tests/test_gi.py | 1 +
2 files changed, 8 insertions(+), 27 deletions(-)
---
diff --git a/gi/pygi-struct-marshal.c b/gi/pygi-struct-marshal.c
index 44797e75..f1b9f13b 100644
--- a/gi/pygi-struct-marshal.c
+++ b/gi/pygi-struct-marshal.c
@@ -439,19 +439,14 @@ arg_struct_to_py_marshal_adapter (PyGIInvokeState *state,
gpointer *cleanup_data)
{
PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
- PyObject *ret;
- ret = pygi_arg_struct_to_py_marshal (arg,
- iface_cache->interface_info,
- iface_cache->g_type,
- iface_cache->py_type,
- arg_cache->transfer,
- arg_cache->is_caller_allocates,
- iface_cache->is_foreign);
-
- *cleanup_data = ret;
-
- return ret;
+ return pygi_arg_struct_to_py_marshal (arg,
+ iface_cache->interface_info,
+ iface_cache->g_type,
+ iface_cache->py_type,
+ arg_cache->transfer,
+ arg_cache->is_caller_allocates,
+ iface_cache->is_foreign);
}
static void
@@ -468,17 +463,6 @@ arg_foreign_to_py_cleanup (PyGIInvokeState *state,
}
}
-static void
-arg_boxed_to_py_cleanup (PyGIInvokeState *state,
- PyGIArgCache *arg_cache,
- gpointer cleanup_data,
- gpointer data,
- gboolean was_processed)
-{
- if (arg_cache->transfer == GI_TRANSFER_NOTHING)
- _pygi_boxed_copy_in_place ((PyGIBoxed *) cleanup_data);
-}
-
static gboolean
arg_type_class_from_py_marshal (PyGIInvokeState *state,
PyGICallableCache *callable_cache,
@@ -558,10 +542,6 @@ arg_struct_to_py_setup (PyGIArgCache *arg_cache,
if (iface_cache->is_foreign)
arg_cache->to_py_cleanup = arg_foreign_to_py_cleanup;
- else if (!g_type_is_a (iface_cache->g_type, G_TYPE_VALUE) &&
- iface_cache->py_type &&
- g_type_is_a (iface_cache->g_type, G_TYPE_BOXED))
- arg_cache->to_py_cleanup = arg_boxed_to_py_cleanup;
}
PyGIArgCache *
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 31085206..8d54004e 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -2562,6 +2562,7 @@ class TestPythonGObject(unittest.TestCase):
@unittest.skipUnless(hasattr(GIMarshallingTests, 'callback_owned_boxed'),
'requires newer version of GI')
+ @unittest.expectedFailure # bug 722899
def test_callback_owned_box(self):
def callback(box, data):
self.box = box
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]