File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ static void ts_globals_ctor(zend_async_globals_t * globals)
117117 globals -> active_coroutine_count = 0 ;
118118 globals -> active_event_count = 0 ;
119119 globals -> coroutine = NULL ;
120- globals -> scope = NULL ;
121120 globals -> scheduler = NULL ;
122121 globals -> exit_exception = NULL ;
123122}
Original file line number Diff line number Diff line change @@ -813,7 +813,7 @@ END_EXTERN_C()
813813#define ZEND_ASYNC_GRACEFUL_SHUTDOWN ZEND_ASYNC_G(graceful_shutdown)
814814#define ZEND_ASYNC_EXIT_EXCEPTION ZEND_ASYNC_G(exit_exception)
815815#define ZEND_ASYNC_CURRENT_COROUTINE ZEND_ASYNC_G(coroutine)
816- #define ZEND_ASYNC_CURRENT_SCOPE ZEND_ASYNC_G(scope)
816+ #define ZEND_ASYNC_CURRENT_SCOPE ZEND_ASYNC_G(coroutine)->scope
817817#define ZEND_ASYNC_SCHEDULER ZEND_ASYNC_G(scheduler)
818818
819819#define ZEND_ASYNC_INCREASE_EVENT_COUNT if (ZEND_ASYNC_G(active_event_count) < UINT_MAX) { \
@@ -1032,6 +1032,6 @@ END_EXTERN_C()
10321032
10331033/* Context API Macros */
10341034#define ZEND_ASYNC_NEW_CONTEXT (parent ) zend_async_new_context_fn(parent)
1035- #define ZEND_ASYNC_CURRENT_CONTEXT ZEND_ASYNC_G(scope)-> context
1035+ #define ZEND_ASYNC_CURRENT_CONTEXT ( ZEND_ASYNC_G(coroutine) != NULL ? ZEND_ASYNC_G(coroutine)->scope-> context : NULL)
10361036
10371037#endif //ZEND_ASYNC_API_H
You can’t perform that action at this time.
0 commit comments