diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-12 17:15:30 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-12 17:15:30 +0100 |
commit | 922e67cabd767c3da74de6d2c9aa59078fa4ad0f (patch) | |
tree | cab0813b2162e145f7a4d9a3fece6922fd699b19 /src/plugins/scripts/tcl | |
parent | 8d25a7520005625822b0a3e8f9c1e72ee756d30d (diff) | |
download | weechat-922e67cabd767c3da74de6d2c9aa59078fa4ad0f.zip |
Add description of arguments for API functions hook_info and hook_infolist
Diffstat (limited to 'src/plugins/scripts/tcl')
-rw-r--r-- | src/plugins/scripts/tcl/weechat-tcl-api.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c index 2e3553256..65fcb1bd4 100644 --- a/src/plugins/scripts/tcl/weechat-tcl-api.c +++ b/src/plugins/scripts/tcl/weechat-tcl-api.c @@ -4110,7 +4110,7 @@ weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *objp; - char *result, *info_name, *description, *function, *data; + char *result, *info_name, *description, *args_description, *function, *data; int i; /* make C compiler happy */ @@ -4122,7 +4122,7 @@ weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, TCL_RETURN_EMPTY; } - if (objc < 5) + if (objc < 6) { WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "hook_info"); TCL_RETURN_EMPTY; @@ -4130,13 +4130,15 @@ weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, info_name = Tcl_GetStringFromObj (objv[1], &i); description = Tcl_GetStringFromObj (objv[2], &i); - function = Tcl_GetStringFromObj (objv[3], &i); - data = Tcl_GetStringFromObj (objv[4], &i); + args_description = Tcl_GetStringFromObj (objv[3], &i); + function = Tcl_GetStringFromObj (objv[4], &i); + data = Tcl_GetStringFromObj (objv[5], &i); result = script_ptr2str (script_api_hook_info (weechat_tcl_plugin, tcl_current_script, info_name, description, + args_description, &weechat_tcl_api_hook_info_cb, function, data)); @@ -4189,7 +4191,8 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *objp; - char *result, *infolist_name, *description, *function, *data; + char *result, *infolist_name, *description, *pointer_description; + char *args_description, *function, *data; int i; /* make C compiler happy */ @@ -4201,7 +4204,7 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, TCL_RETURN_EMPTY; } - if (objc < 5) + if (objc < 7) { WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "hook_infolist"); TCL_RETURN_EMPTY; @@ -4209,13 +4212,17 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, infolist_name = Tcl_GetStringFromObj (objv[1], &i); description = Tcl_GetStringFromObj (objv[2], &i); - function = Tcl_GetStringFromObj (objv[3], &i); - data = Tcl_GetStringFromObj (objv[4], &i); + pointer_description = Tcl_GetStringFromObj (objv[3], &i); + args_description = Tcl_GetStringFromObj (objv[4], &i); + function = Tcl_GetStringFromObj (objv[5], &i); + data = Tcl_GetStringFromObj (objv[6], &i); result = script_ptr2str (script_api_hook_infolist (weechat_tcl_plugin, tcl_current_script, infolist_name, description, + pointer_description, + args_description, &weechat_tcl_api_hook_infolist_cb, function, data)); |