Skip to content

Commit 68794e0

Browse files
committed
Use RETURN_NEW_STR() in url.c
This avoids an extra branch.
1 parent 1b4bca6 commit 68794e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/url.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ PHP_FUNCTION(urlencode)
559559
Z_PARAM_STR(in_str)
560560
ZEND_PARSE_PARAMETERS_END();
561561

562-
RETURN_STR(php_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
562+
RETURN_NEW_STR(php_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
563563
}
564564
/* }}} */
565565

@@ -621,7 +621,7 @@ PHP_FUNCTION(rawurlencode)
621621
Z_PARAM_STR(in_str)
622622
ZEND_PARSE_PARAMETERS_END();
623623

624-
RETURN_STR(php_raw_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
624+
RETURN_NEW_STR(php_raw_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
625625
}
626626
/* }}} */
627627

0 commit comments

Comments
 (0)