mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Convert zend_parse_parameters_none() to fast ZPP
I've done the conversion in those extensions where fast ZPP is predominant.
This commit is contained in:
parent
b7d2882fee
commit
8f4f1dea34
9 changed files with 60 additions and 130 deletions
|
@ -339,9 +339,7 @@ static PHP_FUNCTION(json_decode)
|
|||
Returns the error code of the last json_encode() or json_decode() call. */
|
||||
static PHP_FUNCTION(json_last_error)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG(JSON_G(error_code));
|
||||
}
|
||||
|
@ -351,9 +349,7 @@ static PHP_FUNCTION(json_last_error)
|
|||
Returns the error string of the last json_encode() or json_decode() call. */
|
||||
static PHP_FUNCTION(json_last_error_msg)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_STRING(php_json_get_error_msg(JSON_G(error_code)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue