From 922e67cabd767c3da74de6d2c9aa59078fa4ad0f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 12 Feb 2010 17:15:30 +0100 Subject: Add description of arguments for API functions hook_info and hook_infolist --- src/plugins/scripts/tcl/weechat-tcl-api.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/plugins/scripts/tcl') 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)); -- cgit v1.2.3