summaryrefslogtreecommitdiff
path: root/src/plugins/tcl
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-08-13 20:45:33 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-08-13 20:45:33 +0200
commit7033fdd0cbb5e066f5e5e9a1d6784196b5211fae (patch)
tree3f8ab24d76cad91ffd9df732b5141d27220fe1f5 /src/plugins/tcl
parent6b75516702cc849d30459d511142c1b7dadf0266 (diff)
downloadweechat-7033fdd0cbb5e066f5e5e9a1d6784196b5211fae.zip
api: add missing function hook_completion_get_string() in script API (issue #484)
Diffstat (limited to 'src/plugins/tcl')
-rw-r--r--src/plugins/tcl/weechat-tcl-api.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c
index 851d423d1..4d1990d8d 100644
--- a/src/plugins/tcl/weechat-tcl-api.c
+++ b/src/plugins/tcl/weechat-tcl-api.c
@@ -3031,6 +3031,26 @@ API_FUNC(hook_completion)
API_RETURN_STRING_FREE(result);
}
+API_FUNC(hook_completion_get_string)
+{
+ Tcl_Obj *objp;
+ char *completion, *property;
+ const char *result;
+ int i;
+
+ API_INIT_FUNC(1, "hook_completion_get_string", API_RETURN_EMPTY);
+ if (objc < 3)
+ API_WRONG_ARGS(API_RETURN_EMPTY);
+
+ completion = Tcl_GetStringFromObj (objv[1], &i);
+ property = Tcl_GetStringFromObj (objv[2], &i);
+
+ result = weechat_hook_completion_get_string (API_STR2PTR(completion),
+ property);
+
+ API_RETURN_STRING(result);
+}
+
API_FUNC(hook_completion_list_add)
{
Tcl_Obj *objp;
@@ -5474,6 +5494,7 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
API_DEF_FUNC(hook_hsignal_send);
API_DEF_FUNC(hook_config);
API_DEF_FUNC(hook_completion);
+ API_DEF_FUNC(hook_completion_get_string);
API_DEF_FUNC(hook_completion_list_add);
API_DEF_FUNC(hook_modifier);
API_DEF_FUNC(hook_modifier_exec);