diff options
Diffstat (limited to 'gi/pygi-marshal-to-py.c')
-rw-r--r-- | gi/pygi-marshal-to-py.c | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c index e3d5475d..5d238a35 100644 --- a/gi/pygi-marshal-to-py.c +++ b/gi/pygi-marshal-to-py.c @@ -285,104 +285,6 @@ err: } PyObject * -_pygi_marshal_to_py_glist (PyGIInvokeState *state, - PyGICallableCache *callable_cache, - PyGIArgCache *arg_cache, - GIArgument *arg) -{ - GList *list_; - gsize length; - gsize i; - - PyGIMarshalToPyFunc item_to_py_marshaller; - PyGIArgCache *item_arg_cache; - PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache; - - PyObject *py_obj = NULL; - - list_ = arg->v_pointer; - length = g_list_length (list_); - - py_obj = PyList_New (length); - if (py_obj == NULL) - return NULL; - - item_arg_cache = seq_cache->item_cache; - item_to_py_marshaller = item_arg_cache->to_py_marshaller; - - for (i = 0; list_ != NULL; list_ = g_list_next (list_), i++) { - GIArgument item_arg; - PyObject *py_item; - - item_arg.v_pointer = list_->data; - _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_tag); - py_item = item_to_py_marshaller (state, - callable_cache, - item_arg_cache, - &item_arg); - - if (py_item == NULL) { - Py_CLEAR (py_obj); - _PyGI_ERROR_PREFIX ("Item %zu: ", i); - return NULL; - } - - PyList_SET_ITEM (py_obj, i, py_item); - } - - return py_obj; -} - -PyObject * -_pygi_marshal_to_py_gslist (PyGIInvokeState *state, - PyGICallableCache *callable_cache, - PyGIArgCache *arg_cache, - GIArgument *arg) -{ - GSList *list_; - gsize length; - gsize i; - - PyGIMarshalToPyFunc item_to_py_marshaller; - PyGIArgCache *item_arg_cache; - PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache; - - PyObject *py_obj = NULL; - - list_ = arg->v_pointer; - length = g_slist_length (list_); - - py_obj = PyList_New (length); - if (py_obj == NULL) - return NULL; - - item_arg_cache = seq_cache->item_cache; - item_to_py_marshaller = item_arg_cache->to_py_marshaller; - - for (i = 0; list_ != NULL; list_ = g_slist_next (list_), i++) { - GIArgument item_arg; - PyObject *py_item; - - item_arg.v_pointer = list_->data; - _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_tag); - py_item = item_to_py_marshaller (state, - callable_cache, - item_arg_cache, - &item_arg); - - if (py_item == NULL) { - Py_CLEAR (py_obj); - _PyGI_ERROR_PREFIX ("Item %zu: ", i); - return NULL; - } - - PyList_SET_ITEM (py_obj, i, py_item); - } - - return py_obj; -} - -PyObject * _pygi_marshal_to_py_gerror (PyGIInvokeState *state, PyGICallableCache *callable_cache, PyGIArgCache *arg_cache, |