Skip to content

Commit

Permalink
optimize, reduce memory copy
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Mar 26, 2024
1 parent 112d692 commit 449adf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext-src/swoole_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ struct ArrayItem {
RETVAL_FALSE;
break;
case IS_STRING:
RETVAL_NEW_STR(zend_string_init(ZSTR_VAL(value.str), ZSTR_LEN(value.str), 0));
RETVAL_STR_COPY(value.str);
break;
case IS_SERIALIZED_OBJECT:
php_swoole_thread_unserialize(value.serialized_object, return_value);
Expand Down

0 comments on commit 449adf9

Please sign in to comment.