diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-12-19 22:39:24 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-12-19 22:39:24 +0100 |
commit | 6f3fd239be85096cdc6d47f8f3351a155d10629c (patch) | |
tree | 46ec884432b1a9f54378ae3135e15813fd75b635 /src/plugins/scripts/python/weechat-python.c | |
parent | 7d52f85f55273ccbd869b6271ba782db5d7682ff (diff) | |
download | weechat-6f3fd239be85096cdc6d47f8f3351a155d10629c.zip |
core: add type "hashtable" for hdata, new api functions: hdata_hashtable and hashtable_map_string
Diffstat (limited to 'src/plugins/scripts/python/weechat-python.c')
-rw-r--r-- | src/plugins/scripts/python/weechat-python.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index f9f134417..db09cc371 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -127,8 +127,8 @@ weechat_python_set_python2_bin () void weechat_python_hashtable_map_cb (void *data, struct t_hashtable *hashtable, - const void *key, - const void *value) + const char *key, + const char *value) { PyObject *dict, *dict_key, *dict_value; @@ -137,8 +137,8 @@ weechat_python_hashtable_map_cb (void *data, dict = (PyObject *)data; - dict_key = Py_BuildValue ("s", (const char *)key); - dict_value = Py_BuildValue ("s", (const char *)value); + dict_key = Py_BuildValue ("s", key); + dict_value = Py_BuildValue ("s", value); PyDict_SetItem (dict, dict_key, dict_value); @@ -163,9 +163,9 @@ weechat_python_hashtable_to_dict (struct t_hashtable *hashtable) return Py_None; } - weechat_hashtable_map (hashtable, - &weechat_python_hashtable_map_cb, - dict); + weechat_hashtable_map_string (hashtable, + &weechat_python_hashtable_map_cb, + dict); return dict; } |