diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-12 00:12:20 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-12 00:12:20 +0200 |
commit | 41d63511b4d9862c3e7c4c0f5bbb76743cd577cf (patch) | |
tree | 2f0ead0e25735e506f7c0584b0d0331021e46ea6 /src/plugins/php/weechat-php.c | |
parent | 5ae557fa523aa9ab166e9fac83a1463abf3be985 (diff) | |
download | weechat-41d63511b4d9862c3e7c4c0f5bbb76743cd577cf.zip |
scripts: fix return value of hook_infolist callback (pointer instead of string)
Diffstat (limited to 'src/plugins/php/weechat-php.c')
-rw-r--r-- | src/plugins/php/weechat-php.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index 439e04d6b..aefcbcf0d 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -589,6 +589,13 @@ weechat_php_exec (struct t_plugin_script *script, int ret_type, convert_to_string (&zretval); ret_value = strdup ((char *)Z_STRVAL(zretval)); } + else if (ret_type == WEECHAT_SCRIPT_EXEC_POINTER) + { + convert_to_string (&zretval); + ret_value = plugin_script_str2ptr (weechat_php_plugin, + script->name, function, + (char *)Z_STRVAL(zretval)); + } else if (ret_type == WEECHAT_SCRIPT_EXEC_INT) { convert_to_long (&zretval); |