diff options
Diffstat (limited to 'src/plugins/php')
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 2 | ||||
-rw-r--r-- | src/plugins/php/weechat-php.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index 1801e79b1..4a30850aa 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -2930,7 +2930,7 @@ weechat_php_api_hook_infolist_cb (const void *pointer, void *data, func_argv[3] = (arguments) ? (char *)arguments : weechat_php_empty_arg; weechat_php_cb (pointer, data, func_argv, "ssss", - WEECHAT_SCRIPT_EXEC_STRING, &rc); + WEECHAT_SCRIPT_EXEC_POINTER, &rc); return rc; } 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); |