1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

Use const void * for keys and values in some hashtable functions

This commit is contained in:
Sebastien Helleu
2010-10-17 10:39:51 +02:00
parent eff0f9abdb
commit ebf94445b9
11 changed files with 34 additions and 34 deletions
+2 -2
View File
@@ -131,8 +131,8 @@ weechat_lua_tohashtable (lua_State *interpreter, int index, int hashtable_size)
while (lua_next (interpreter, index - 1) != 0)
{
weechat_hashtable_set (hashtable,
(char *)lua_tostring (interpreter, -2),
(char *)lua_tostring (interpreter, -1));
lua_tostring (interpreter, -2),
lua_tostring (interpreter, -1));
/* remove value from stack (keep key for next iteration) */
lua_pop (interpreter, 1);
}
+1 -1
View File
@@ -148,7 +148,7 @@ weechat_python_dict_to_hashtable (PyObject *dict, int hashtable_size)
{
str_key = PyString_AsString (key);
str_value = PyString_AsString (value);
weechat_hashtable_set (hashtable, (void *)str_key, (void *)str_value);
weechat_hashtable_set (hashtable, str_key, str_value);
}
return hashtable;
+2 -2
View File
@@ -153,8 +153,8 @@ weechat_tcl_dict_to_hashtable (Tcl_Interp *interp, Tcl_Obj *dict,
for (; !done ; Tcl_DictObjNext(&search, &key, &value, &done))
{
weechat_hashtable_set (hashtable,
(void *)Tcl_GetString (key),
(void *)Tcl_GetString (value));
Tcl_GetString (key),
Tcl_GetString (value));
}
}
Tcl_DictObjDone(&search);