From 72c1af25e0af8eb5a7ddb45578e33ae09eaf6757 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 9 Aug 2013 22:54:06 +0200 Subject: [PATCH] core: set "callback_free_value" directly in hashtable without calling function hashtable_set_pointer --- src/core/wee-hdata.c | 4 +--- src/gui/gui-color.c | 4 +--- 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) {