mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
scripts: fix return value of hook_infolist callback (pointer instead of string)
This commit is contained in:
@@ -527,6 +527,19 @@ weechat_ruby_exec (struct t_plugin_script *script,
|
||||
else
|
||||
ret_value = NULL;
|
||||
}
|
||||
else if ((TYPE(rc) == T_STRING) && (ret_type == WEECHAT_SCRIPT_EXEC_POINTER))
|
||||
{
|
||||
if (StringValuePtr (rc))
|
||||
{
|
||||
ret_value = plugin_script_str2ptr (weechat_ruby_plugin,
|
||||
script->name, function,
|
||||
StringValuePtr (rc));
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = NULL;
|
||||
}
|
||||
}
|
||||
else if ((TYPE(rc) == T_FIXNUM) && (ret_type == WEECHAT_SCRIPT_EXEC_INT))
|
||||
{
|
||||
ret_i = malloc (sizeof (*ret_i));
|
||||
|
||||
Reference in New Issue
Block a user