Skip to content

Commit 4f36623

Browse files
committedJan 22, 2023
Use RETURN_STR_COPY in mb_output_handler
This means the same thing and makes the code read a tiny bit better. Thanks to Nikita Popov for the tip.
1 parent 6f53dbb commit 4f36623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎ext/mbstring/mbstring.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ PHP_FUNCTION(mb_output_handler)
15341534

15351535
const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding);
15361536
if (encoding == &mbfl_encoding_pass) {
1537-
RETURN_STR(zend_string_copy(str));
1537+
RETURN_STR_COPY(str);
15381538
}
15391539

15401540
if (arg_status & PHP_OUTPUT_HANDLER_START) {
@@ -1574,7 +1574,7 @@ PHP_FUNCTION(mb_output_handler)
15741574
}
15751575

15761576
if (!MBSTRG(outconv_enabled)) {
1577-
RETURN_STR(zend_string_copy(str));
1577+
RETURN_STR_COPY(str);
15781578
}
15791579

15801580
mb_convert_buf buf;

0 commit comments

Comments
 (0)
Please sign in to comment.