mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Split fiber status and flags (#7094)
Co-Authored-By: twosee <twose@qq.com>
This commit is contained in:
parent
b601acf35e
commit
d2e5203865
5 changed files with 51 additions and 40 deletions
|
@ -6873,7 +6873,7 @@ ZEND_METHOD(ReflectionFiber, getFiber)
|
|||
}
|
||||
|
||||
#define REFLECTION_CHECK_VALID_FIBER(fiber) do { \
|
||||
if (fiber == NULL || fiber->status == ZEND_FIBER_STATUS_INIT || fiber->status & ZEND_FIBER_STATUS_FINISHED) { \
|
||||
if (fiber == NULL || fiber->status == ZEND_FIBER_STATUS_INIT || fiber->status == ZEND_FIBER_STATUS_DEAD) { \
|
||||
zend_throw_error(NULL, "Cannot fetch information from a fiber that has not been started or is terminated"); \
|
||||
RETURN_THROWS(); \
|
||||
} \
|
||||
|
@ -6948,7 +6948,7 @@ ZEND_METHOD(ReflectionFiber, getCallable)
|
|||
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (fiber == NULL || fiber->status & ZEND_FIBER_STATUS_FINISHED) {
|
||||
if (fiber == NULL || fiber->status == ZEND_FIBER_STATUS_DEAD) {
|
||||
zend_throw_error(NULL, "Cannot fetch the callable from a fiber that has terminated"); \
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue