diff options
Diffstat (limited to 'bindings/python/wrapper_top.c')
| -rw-r--r-- | bindings/python/wrapper_top.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c index e71c5fa2..4de78737 100644 --- a/bindings/python/wrapper_top.c +++ b/bindings/python/wrapper_top.c @@ -141,14 +141,15 @@ set_hashtable_of_pygobject(GHashTable *a_hash, PyObject *dict) { if (! PyString_Check(key) || ! PyObject_TypeCheck(value, &PyGObjectPtrType)) { PyErr_SetString(PyExc_TypeError, - "value should be a dict," - "with string keys" + "value should be a dict, " + "with string keys " "and GObjectPtr values"); goto failure; } g_object_ref(((PyGObjectPtr*)value)->obj); } g_hash_table_remove_all (a_hash); + i = 0; while (PyDict_Next(dict, &i, &key, &value)) { char *ckey = g_strdup(PyString_AsString(key)); g_hash_table_replace (a_hash, ckey, ((PyGObjectPtr*)value)->obj); |
