From e4fb9a4a4bda945127f3a092cf4fb33e82abb81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 12 Aug 2014 07:32:15 +0200 Subject: [PATCH] doc: add example with "callback_free_key" in function hashtable_set_pointer (plugin API reference) --- doc/fr/weechat_plugin_api.fr.asciidoc | 7 +++++++ doc/it/weechat_plugin_api.it.asciidoc | 7 +++++++ doc/ja/weechat_plugin_api.ja.asciidoc | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc index ec5a50b2a..1a6052238 100644 --- a/doc/fr/weechat_plugin_api.fr.asciidoc +++ b/doc/fr/weechat_plugin_api.fr.asciidoc @@ -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] diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc index 1e9f5a3cd..1d05a074e 100644 --- a/doc/it/weechat_plugin_api.it.asciidoc +++ b/doc/it/weechat_plugin_api.it.asciidoc @@ -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] diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc index 8432411d5..0b14d93d6 100644 --- a/doc/ja/weechat_plugin_api.ja.asciidoc +++ b/doc/ja/weechat_plugin_api.ja.asciidoc @@ -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]