@@ -215,26 +215,23 @@ static void php_coro_create(void *arg)
215
215
{
216
216
int i;
217
217
php_args *php_arg = (php_args *) arg;
218
- zend_fcall_info_cache * fci_cache = php_arg->fci_cache ;
219
- zend_function *func = fci_cache-> function_handler ;
218
+ zend_fcall_info_cache fci_cache = * php_arg->fci_cache ;
219
+ zend_function *func = fci_cache. function_handler ;
220
220
zval *argv = php_arg->argv ;
221
221
int argc = php_arg->argc ;
222
222
coro_task *task;
223
223
coro_task *origin_task = php_arg->origin_task ;
224
224
zend_execute_data *call;
225
- zval _zobject, *zobject = nullptr ;
226
225
zval _retval, *retval = &_retval;
227
226
228
227
if (swCoroG.count () > COROG.peak_coro_num )
229
228
{
230
229
COROG.peak_coro_num = swCoroG.count ();
231
230
}
232
231
233
- if (fci_cache-> object )
232
+ if (fci_cache. object )
234
233
{
235
- zobject = &_zobject;
236
- ZVAL_OBJ (zobject, fci_cache->object );
237
- Z_ADDREF_P (zobject);
234
+ GC_ADDREF (fci_cache.object );
238
235
}
239
236
240
237
php_vm_stack_init ();
@@ -243,7 +240,7 @@ static void php_coro_create(void *arg)
243
240
EG (vm_stack_top) = (zval *) ((char *) call + TASK_SLOT * sizeof (zval));
244
241
call = zend_vm_stack_push_call_frame (
245
242
ZEND_CALL_TOP_FUNCTION | ZEND_CALL_ALLOCATED,
246
- func, argc, fci_cache-> called_scope , fci_cache-> object
243
+ func, argc, fci_cache. called_scope , fci_cache. object
247
244
);
248
245
249
246
SW_SET_EG_SCOPE (func->common .scope );
@@ -331,9 +328,9 @@ static void php_coro_create(void *arg)
331
328
332
329
zval_ptr_dtor (retval);
333
330
334
- if (zobject )
331
+ if (fci_cache. object )
335
332
{
336
- zval_ptr_dtor (zobject );
333
+ OBJ_RELEASE (fci_cache. object );
337
334
}
338
335
339
336
if (UNEXPECTED (EG (exception)))
0 commit comments