summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-08-09 22:54:06 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-08-09 22:54:06 +0200
commit72c1af25e0af8eb5a7ddb45578e33ae09eaf6757 (patch)
treeb67363f98a7a9dd33de809341d9c6dd06f578704
parentd466a86efc52b90348a292bec793bbaf37449661 (diff)
downloadweechat-72c1af25e0af8eb5a7ddb45578e33ae09eaf6757.zip
core: set "callback_free_value" directly in hashtable without calling function hashtable_set_pointer
-rw-r--r--src/core/wee-hdata.c4
-rw-r--r--src/gui/gui-color.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c
index 6391676e4..4ea345e39 100644
--- a/src/core/wee-hdata.c
+++ b/src/core/wee-hdata.c
@@ -105,9 +105,7 @@ hdata_new (struct t_weechat_plugin *plugin, const char *hdata_name,
WEECHAT_HASHTABLE_POINTER,
NULL,
NULL);
- hashtable_set_pointer (new_hdata->hash_var,
- "callback_free_value",
- &hdata_free_var);
+ new_hdata->hash_var->callback_free_value = &hdata_free_var;
new_hdata->hash_list = hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_POINTER,
diff --git a/src/gui/gui-color.c b/src/gui/gui-color.c
index fb38aa430..184d13cdf 100644
--- a/src/gui/gui-color.c
+++ b/src/gui/gui-color.c
@@ -632,9 +632,7 @@ gui_color_palette_alloc_structs ()
WEECHAT_HASHTABLE_POINTER,
NULL,
NULL);
- hashtable_set_pointer (gui_color_hash_palette_color,
- "callback_free_value",
- &gui_color_palette_free_value_cb);
+ gui_color_hash_palette_color->callback_free_value = &gui_color_palette_free_value_cb;
}
if (!gui_color_hash_palette_alias)
{