Skip to content

Commit

Permalink
Use RETURN_STR_COPY in mb_output_handler
Browse files Browse the repository at this point in the history
This means the same thing and makes the code read a tiny bit better.

Thanks to Nikita Popov for the tip.
  • Loading branch information
alexdowad committed Jan 22, 2023
1 parent 6f53dbb commit 4f36623
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/mbstring/mbstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ PHP_FUNCTION(mb_output_handler)

const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding);
if (encoding == &mbfl_encoding_pass) {
RETURN_STR(zend_string_copy(str));
RETURN_STR_COPY(str);
}

if (arg_status & PHP_OUTPUT_HANDLER_START) {
Expand Down Expand Up @@ -1574,7 +1574,7 @@ PHP_FUNCTION(mb_output_handler)
}

if (!MBSTRG(outconv_enabled)) {
RETURN_STR(zend_string_copy(str));
RETURN_STR_COPY(str);
}

mb_convert_buf buf;
Expand Down

0 comments on commit 4f36623

Please # to comment.