diff options
author | Nikita Popov <nikic@php.net> | 2015-12-11 16:33:47 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-12-11 16:33:47 +0100 |
commit | b343cd913bceeb0eac938226631e4dd39ed249ad (patch) | |
tree | 943cda9e22c6a26a9f50cd842db868758cb87e9e /ext/readline | |
parent | 1b683efa0f08f33a5b60293f0505a90ded48dc3d (diff) | |
parent | 04407b79dfa41a38a6bce3823b3f80eab9ce3ae8 (diff) | |
download | php-git-b343cd913bceeb0eac938226631e4dd39ed249ad.tar.gz |
Merge branch 'PHP-7.0'
Diffstat (limited to 'ext/readline')
-rw-r--r-- | ext/readline/readline.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 11fa5964b6..6c3fda5dd6 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -188,7 +188,7 @@ PHP_MSHUTDOWN_FUNCTION(readline) PHP_RSHUTDOWN_FUNCTION(readline) { - zval_dtor(&_readline_completion); + zval_ptr_dtor(&_readline_completion); ZVAL_UNDEF(&_readline_completion); #if HAVE_RL_CALLBACK_READ_CHAR if (Z_TYPE(_prepped_callback) != IS_UNDEF) { @@ -505,7 +505,7 @@ static char **_readline_completion_cb(const char *text, int start, int end) for (i = 0; i < 3; i++) { zval_ptr_dtor(¶ms[i]); } - zval_dtor(&_readline_array); + zval_ptr_dtor(&_readline_array); return matches; } @@ -526,8 +526,8 @@ PHP_FUNCTION(readline_completion_function) } zend_string_release(name); - zval_dtor(&_readline_completion); - ZVAL_DUP(&_readline_completion, arg); + zval_ptr_dtor(&_readline_completion); + ZVAL_COPY(&_readline_completion, arg); rl_attempted_completion_function = _readline_completion_cb; if (rl_attempted_completion_function == NULL) { @@ -552,7 +552,7 @@ static void php_rl_callback_handler(char *the_line) call_user_function(CG(function_table), NULL, &_prepped_callback, &dummy, 1, params); zval_ptr_dtor(¶ms[0]); - zval_dtor(&dummy); + zval_ptr_dtor(&dummy); } /* {{{ proto void readline_callback_handler_install(string prompt, mixed callback) @@ -577,10 +577,10 @@ PHP_FUNCTION(readline_callback_handler_install) if (Z_TYPE(_prepped_callback) != IS_UNDEF) { rl_callback_handler_remove(); - zval_dtor(&_prepped_callback); + zval_ptr_dtor(&_prepped_callback); } - ZVAL_DUP(&_prepped_callback, callback); + ZVAL_COPY(&_prepped_callback, callback); rl_callback_handler_install(prompt, php_rl_callback_handler); @@ -604,7 +604,7 @@ PHP_FUNCTION(readline_callback_handler_remove) { if (Z_TYPE(_prepped_callback) != IS_UNDEF) { rl_callback_handler_remove(); - zval_dtor(&_prepped_callback); + zval_ptr_dtor(&_prepped_callback); ZVAL_UNDEF(&_prepped_callback); RETURN_TRUE; } |