summaryrefslogtreecommitdiff
path: root/doc/ja
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-01-01 18:10:47 +0100
committerSébastien Helleu <flashcode@flashtux.org>2021-01-01 18:10:47 +0100
commit943374f7898cd975a34bfa9df1ba7693be744ef0 (patch)
treefa8cafdd8afa1df8f40347f66bf29dff74059deb /doc/ja
parentd413ccdf4fbab249084afa0b73393b947415d02c (diff)
downloadweechat-943374f7898cd975a34bfa9df1ba7693be744ef0.zip
doc: add note about call to "regfree" after call to "string_regcomp" (plugin API reference)
Diffstat (limited to 'doc/ja')
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 32c1d4400..91d6f886a 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -1344,14 +1344,26 @@ int weechat_string_regcomp (void *preg, const char *regex, int default_flags)
* `regcomp` 関数と同じ戻り値
(成功の場合は 0、エラーが起きた場合は 0 以外、`man regcomp` を参照)
+[NOTE]
+// TRANSLATION MISSING
+Regular expression _preg_ must be cleaned by calling "regfree" after use,
+if the function returned 0 (OK).
+
C 言語での使用例:
[source,C]
----
regex_t my_regex;
-if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0)
+if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) == 0)
+{
+ /* OK */
+ /* ... */
+ regfree (&my_regex);
+}
+else
{
/* error */
+ /* ... */
}
----