summaryrefslogtreecommitdiff
path: root/gi/pygi-marshal-cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pygi-marshal-cleanup.c')
-rw-r--r--gi/pygi-marshal-cleanup.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/gi/pygi-marshal-cleanup.c b/gi/pygi-marshal-cleanup.c
index 33d0339f..38783d90 100644
--- a/gi/pygi-marshal-cleanup.c
+++ b/gi/pygi-marshal-cleanup.c
@@ -548,66 +548,3 @@ _pygi_marshal_cleanup_to_py_glist (PyGIInvokeState *state,
}
}
-void
-_pygi_marshal_cleanup_from_py_ghash (PyGIInvokeState *state,
- PyGIArgCache *arg_cache,
- PyObject *py_arg,
- gpointer data,
- gboolean was_processed)
-{
- if (data == NULL)
- return;
-
- if (was_processed) {
- GHashTable *hash_;
- PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
-
- hash_ = (GHashTable *)data;
-
- /* clean up keys and values first */
- if (hash_cache->key_cache->from_py_cleanup != NULL ||
- hash_cache->value_cache->from_py_cleanup != NULL) {
- GHashTableIter hiter;
- gpointer key;
- gpointer value;
-
- PyGIMarshalCleanupFunc key_cleanup_func =
- hash_cache->key_cache->from_py_cleanup;
- PyGIMarshalCleanupFunc value_cleanup_func =
- hash_cache->value_cache->from_py_cleanup;
-
- g_hash_table_iter_init (&hiter, hash_);
- while (g_hash_table_iter_next (&hiter, &key, &value)) {
- if (key != NULL && key_cleanup_func != NULL)
- key_cleanup_func (state,
- hash_cache->key_cache,
- NULL,
- key,
- TRUE);
- if (value != NULL && value_cleanup_func != NULL)
- value_cleanup_func (state,
- hash_cache->value_cache,
- NULL,
- value,
- TRUE);
- }
- }
-
- g_hash_table_unref (hash_);
- }
-}
-
-void
-_pygi_marshal_cleanup_to_py_ghash (PyGIInvokeState *state,
- PyGIArgCache *arg_cache,
- PyObject *dummy,
- gpointer data,
- gboolean was_processed)
-{
- if (data == NULL)
- return;
-
- /* assume hashtable has boxed key and value */
- if (arg_cache->transfer == GI_TRANSFER_EVERYTHING || arg_cache->transfer == GI_TRANSFER_CONTAINER)
- g_hash_table_unref ( (GHashTable *)data);
-}