summaryrefslogtreecommitdiff
path: root/gi/pygi-marshal-to-py.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pygi-marshal-to-py.c')
-rw-r--r--gi/pygi-marshal-to-py.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c
index 9427754a..3c7d69e6 100644
--- a/gi/pygi-marshal-to-py.c
+++ b/gi/pygi-marshal-to-py.c
@@ -537,91 +537,6 @@ _pygi_marshal_to_py_gslist (PyGIInvokeState *state,
}
PyObject *
-_pygi_marshal_to_py_ghash (PyGIInvokeState *state,
- PyGICallableCache *callable_cache,
- PyGIArgCache *arg_cache,
- GIArgument *arg)
-{
- GHashTable *hash_;
- GHashTableIter hash_table_iter;
-
- PyGIMarshalToPyFunc key_to_py_marshaller;
- PyGIMarshalToPyFunc value_to_py_marshaller;
-
- PyGIArgCache *key_arg_cache;
- PyGIArgCache *value_arg_cache;
- PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
-
- GIArgument key_arg;
- GIArgument value_arg;
-
- PyObject *py_obj = NULL;
-
- hash_ = arg->v_pointer;
-
- if (hash_ == NULL) {
- py_obj = Py_None;
- Py_INCREF (py_obj);
- return py_obj;
- }
-
- py_obj = PyDict_New ();
- if (py_obj == NULL)
- return NULL;
-
- key_arg_cache = hash_cache->key_cache;
- key_to_py_marshaller = key_arg_cache->to_py_marshaller;
-
- value_arg_cache = hash_cache->value_cache;
- value_to_py_marshaller = value_arg_cache->to_py_marshaller;
-
- g_hash_table_iter_init (&hash_table_iter, hash_);
- while (g_hash_table_iter_next (&hash_table_iter,
- &key_arg.v_pointer,
- &value_arg.v_pointer)) {
- PyObject *py_key;
- PyObject *py_value;
- int retval;
-
-
- _pygi_hash_pointer_to_arg (&key_arg, hash_cache->key_cache->type_tag);
- py_key = key_to_py_marshaller ( state,
- callable_cache,
- key_arg_cache,
- &key_arg);
-
- if (py_key == NULL) {
- Py_CLEAR (py_obj);
- return NULL;
- }
-
- _pygi_hash_pointer_to_arg (&value_arg, hash_cache->value_cache->type_tag);
- py_value = value_to_py_marshaller ( state,
- callable_cache,
- value_arg_cache,
- &value_arg);
-
- if (py_value == NULL) {
- Py_CLEAR (py_obj);
- Py_DECREF(py_key);
- return NULL;
- }
-
- retval = PyDict_SetItem (py_obj, py_key, py_value);
-
- Py_DECREF (py_key);
- Py_DECREF (py_value);
-
- if (retval < 0) {
- Py_CLEAR (py_obj);
- return NULL;
- }
- }
-
- return py_obj;
-}
-
-PyObject *
_pygi_marshal_to_py_gerror (PyGIInvokeState *state,
PyGICallableCache *callable_cache,
PyGIArgCache *arg_cache,