1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

doc: add example with "callback_free_key" in function hashtable_set_pointer (plugin API reference)

This commit is contained in:
Sébastien Helleu
2014-08-12 07:32:15 +02:00
parent 62d891aea9
commit e4fb9a4a4b
3 changed files with 21 additions and 0 deletions
+7
View File
@@ -3870,7 +3870,14 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value)
/* ... */
}
void
my_free_key_cb (struct t_hashtable *hashtable, void *key)
{
/* ... */
}
weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb);
weechat_hashtable_set_pointer (hashtable, "callback_free_key", &my_free_key_cb);
----
[NOTE]
+7
View File
@@ -3897,7 +3897,14 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value)
/* ... */
}
void
my_free_key_cb (struct t_hashtable *hashtable, void *key)
{
/* ... */
}
weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb);
weechat_hashtable_set_pointer (hashtable, "callback_free_key", &my_free_key_cb);
----
[NOTE]
+7
View File
@@ -3808,7 +3808,14 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value)
/* ... */
}
void
my_free_key_cb (struct t_hashtable *hashtable, void *key)
{
/* ... */
}
weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb);
weechat_hashtable_set_pointer (hashtable, "callback_free_key", &my_free_key_cb);
----
[NOTE]