Skip to content

Commit a234299

Browse files
committed
% The ZEND_ASYNC_NEW_SCOPE API function has been modified — it can now create a Scope without a ZEND object for internal use.
A new macro has been added: ZEND_ASYNC_NEW_SCOPE_WITH_OBJECT
1 parent 209bd32 commit a234299

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Zend/zend_async_API.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ typedef struct _zend_async_task_s zend_async_task_t;
183183
/* Internal context typedefs removed - using direct functions */
184184

185185
typedef zend_coroutine_t * (*zend_async_new_coroutine_t)(zend_async_scope_t *scope);
186-
typedef zend_async_scope_t * (*zend_async_new_scope_t)(zend_async_scope_t * parent_scope);
186+
typedef zend_async_scope_t * (*zend_async_new_scope_t)(zend_async_scope_t * parent_scope, bool with_zend_object);
187187
typedef zend_coroutine_t * (*zend_async_spawn_t)(zend_async_scope_t *scope, zend_object *scope_provider);
188188
typedef void (*zend_async_suspend_t)(bool from_main);
189189
typedef void (*zend_async_enqueue_coroutine_t)(zend_coroutine_t *coroutine);
@@ -1235,7 +1235,8 @@ END_EXTERN_C()
12351235
#define ZEND_ASYNC_SPAWN_WITH(scope) zend_async_spawn_fn(scope, NULL)
12361236
#define ZEND_ASYNC_SPAWN_WITH_PROVIDER(scope_provider) zend_async_spawn_fn(NULL, scope_provider)
12371237
#define ZEND_ASYNC_NEW_COROUTINE(scope) zend_async_new_coroutine_fn(scope)
1238-
#define ZEND_ASYNC_NEW_SCOPE(parent) zend_async_new_scope_fn(parent)
1238+
#define ZEND_ASYNC_NEW_SCOPE(parent) zend_async_new_scope_fn(parent, false)
1239+
#define ZEND_ASYNC_NEW_SCOPE_WITH_OBJECT(parent) zend_async_new_scope_fn(parent, true)
12391240
#define ZEND_ASYNC_SUSPEND() zend_async_suspend_fn(false)
12401241
#define ZEND_ASYNC_RUN_SCHEDULER_AFTER_MAIN() zend_async_suspend_fn(true)
12411242
#define ZEND_ASYNC_ENQUEUE_COROUTINE(coroutine) zend_async_enqueue_coroutine_fn(coroutine)

0 commit comments

Comments
 (0)