Skip to content

Commit 875eadb

Browse files
committed
* This would improve clarify, especially with the existence of the unrelated ZEND_ASYNC_EVENT_REF_SET.
1 parent 6330251 commit 875eadb

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

coroutine.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,10 +1077,10 @@ static void finally_handlers_iterator_dtor(zend_async_iterator_t *zend_iterator)
10771077
efree(context);
10781078
iterator->extended_data = NULL;
10791079

1080-
if (ZEND_ASYNC_EVENT_REF(&scope->scope.event) > 0) {
1080+
if (ZEND_ASYNC_EVENT_REFCOUNT(&scope->scope.event) > 0) {
10811081
ZEND_ASYNC_EVENT_DEL_REF(&scope->scope.event);
10821082

1083-
if (ZEND_ASYNC_EVENT_REF(&scope->scope.event) <= 1) {
1083+
if (ZEND_ASYNC_EVENT_REFCOUNT(&scope->scope.event) <= 1) {
10841084
scope->scope.try_to_dispose(&scope->scope);
10851085
}
10861086
}

libuv_reactor.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static void libuv_poll_stop(zend_async_event_t *event)
333333
/* {{{ libuv_poll_dispose */
334334
static void libuv_poll_dispose(zend_async_event_t *event)
335335
{
336-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
336+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
337337
ZEND_ASYNC_EVENT_DEL_REF(event);
338338
return;
339339
}
@@ -503,7 +503,7 @@ static void libuv_poll_proxy_stop(zend_async_event_t *event)
503503
/* {{{ libuv_poll_proxy_dispose */
504504
static void libuv_poll_proxy_dispose(zend_async_event_t *event)
505505
{
506-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
506+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
507507
ZEND_ASYNC_EVENT_DEL_REF(event);
508508
return;
509509
}
@@ -685,7 +685,7 @@ static void libuv_timer_stop(zend_async_event_t *event)
685685
/* {{{ libuv_timer_dispose */
686686
static void libuv_timer_dispose(zend_async_event_t *event)
687687
{
688-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
688+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
689689
ZEND_ASYNC_EVENT_DEL_REF(event);
690690
return;
691691
}
@@ -785,7 +785,7 @@ static void libuv_signal_stop(zend_async_event_t *event)
785785
/* {{{ libuv_signal_dispose */
786786
static void libuv_signal_dispose(zend_async_event_t *event)
787787
{
788-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
788+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
789789
ZEND_ASYNC_EVENT_DEL_REF(event);
790790
return;
791791
}
@@ -1494,7 +1494,7 @@ static void libuv_process_event_stop(zend_async_event_t *event)
14941494
/* {{{ libuv_process_event_dispose */
14951495
static void libuv_process_event_dispose(zend_async_event_t *event)
14961496
{
1497-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
1497+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
14981498
ZEND_ASYNC_EVENT_DEL_REF(event);
14991499
return;
15001500
}
@@ -1643,7 +1643,7 @@ static void libuv_filesystem_stop(zend_async_event_t *event)
16431643
/* {{{ libuv_filesystem_dispose */
16441644
static void libuv_filesystem_dispose(zend_async_event_t *event)
16451645
{
1646-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
1646+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
16471647
ZEND_ASYNC_EVENT_DEL_REF(event);
16481648
return;
16491649
}
@@ -1776,7 +1776,7 @@ static void libuv_dns_nameinfo_stop(zend_async_event_t *event)
17761776
/* {{{ libuv_dns_nameinfo_dispose */
17771777
static void libuv_dns_nameinfo_dispose(zend_async_event_t *event)
17781778
{
1779-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
1779+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
17801780
ZEND_ASYNC_EVENT_DEL_REF(event);
17811781
return;
17821782
}
@@ -1889,7 +1889,7 @@ static void libuv_dns_getaddrinfo_stop(zend_async_event_t *event)
18891889
/* {{{ libuv_dns_getaddrinfo_dispose */
18901890
static void libuv_dns_getaddrinfo_dispose(zend_async_event_t *event)
18911891
{
1892-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
1892+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
18931893
ZEND_ASYNC_EVENT_DEL_REF(event);
18941894
return;
18951895
}
@@ -2142,7 +2142,7 @@ static void libuv_exec_stop(zend_async_event_t *event)
21422142
/* {{{ libuv_exec_dispose */
21432143
static void libuv_exec_dispose(zend_async_event_t *event)
21442144
{
2145-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
2145+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
21462146
ZEND_ASYNC_EVENT_DEL_REF(event);
21472147
return;
21482148
}
@@ -2413,7 +2413,7 @@ static void libuv_trigger_event_stop(zend_async_event_t *event)
24132413
/* {{{ libuv_trigger_event_dispose */
24142414
static void libuv_trigger_event_dispose(zend_async_event_t *event)
24152415
{
2416-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
2416+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
24172417
ZEND_ASYNC_EVENT_DEL_REF(event);
24182418
return;
24192419
}
@@ -2561,7 +2561,7 @@ static void libuv_listen_stop(zend_async_event_t *event)
25612561
/* {{{ libuv_listen_dispose */
25622562
static void libuv_listen_dispose(zend_async_event_t *event)
25632563
{
2564-
if (ZEND_ASYNC_EVENT_REF(event) > 1) {
2564+
if (ZEND_ASYNC_EVENT_REFCOUNT(event) > 1) {
25652565
ZEND_ASYNC_EVENT_DEL_REF(event);
25662566
return;
25672567
}

scope.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,12 +1074,12 @@ static void scope_dispose(zend_async_event_t *scope_event)
10741074
return;
10751075
}
10761076

1077-
if (ZEND_ASYNC_EVENT_REF(scope_event) > 1) {
1077+
if (ZEND_ASYNC_EVENT_REFCOUNT(scope_event) > 1) {
10781078
ZEND_ASYNC_EVENT_DEL_REF(scope_event);
10791079
return;
10801080
}
10811081

1082-
if (ZEND_ASYNC_EVENT_REF(scope_event) == 1) {
1082+
if (ZEND_ASYNC_EVENT_REFCOUNT(scope_event) == 1) {
10831083
ZEND_ASYNC_EVENT_DEL_REF(scope_event);
10841084
}
10851085

0 commit comments

Comments
 (0)