mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Use RETURN_NEW_STR() in url.c
This avoids an extra branch.
This commit is contained in:
parent
1b4bca605c
commit
68794e074b
1 changed files with 2 additions and 2 deletions
|
@ -559,7 +559,7 @@ PHP_FUNCTION(urlencode)
|
||||||
Z_PARAM_STR(in_str)
|
Z_PARAM_STR(in_str)
|
||||||
ZEND_PARSE_PARAMETERS_END();
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
RETURN_STR(php_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
|
RETURN_NEW_STR(php_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ PHP_FUNCTION(rawurlencode)
|
||||||
Z_PARAM_STR(in_str)
|
Z_PARAM_STR(in_str)
|
||||||
ZEND_PARSE_PARAMETERS_END();
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
RETURN_STR(php_raw_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
|
RETURN_NEW_STR(php_raw_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue