1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 17:53:13 +02:00

scripts: fix return value of hook_infolist callback (pointer instead of string)

This commit is contained in:
Sébastien Helleu
2018-04-12 00:12:20 +02:00
parent 5ae557fa52
commit 41d63511b4
18 changed files with 129 additions and 10 deletions
+1 -1
View File
@@ -3343,7 +3343,7 @@ weechat_tcl_api_hook_infolist_cb (const void *pointer, void *data,
result = (struct t_infolist *)weechat_tcl_exec (
script,
WEECHAT_SCRIPT_EXEC_STRING,
WEECHAT_SCRIPT_EXEC_POINTER,
ptr_function,
"ssss", func_argv);
+12
View File
@@ -263,6 +263,18 @@ weechat_tcl_exec (struct t_plugin_script *script,
else
ret_val = NULL;
}
else if (ret_type == WEECHAT_SCRIPT_EXEC_POINTER)
{
ret_cv = Tcl_GetStringFromObj (Tcl_GetObjResult (interp), &i);
if (ret_cv)
{
ret_val = plugin_script_str2ptr (weechat_tcl_plugin,
script->name, function,
ret_cv);
}
else
ret_val = NULL;
}
else if ( ret_type == WEECHAT_SCRIPT_EXEC_INT
&& Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp), &i) == TCL_OK)
{