Skip to content

Commit 843720b

Browse files
committed
#50: remove unused code
1 parent ecd3496 commit 843720b

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

coroutine.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838

3939
zend_class_entry *async_ce_coroutine = NULL;
4040

41-
#if defined(__GNUC__) || defined(__clang__)
42-
# define UNUSED __attribute__((unused))
43-
#else
44-
# define UNUSED
45-
#endif
46-
47-
static zend_function UNUSED coroutine_root_function = { ZEND_INTERNAL_FUNCTION };
4841
static zend_object_handlers coroutine_handlers;
4942

5043
// Forward declarations for internal functions

scheduler.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -571,34 +571,6 @@ static bool resolve_deadlocks(void)
571571
///////////////////////////////////////////////////////////
572572
/// SHUTDOWN AND CLEANUP
573573
///////////////////////////////////////////////////////////
574-
575-
#if defined(__GNUC__) || defined(__clang__)
576-
# define UNUSED __attribute__((unused))
577-
#else
578-
# define UNUSED
579-
#endif
580-
581-
static void UNUSED dispose_coroutines(void)
582-
{
583-
zval *current;
584-
585-
ZEND_HASH_FOREACH_VAL(&ASYNC_G(coroutines), current)
586-
{
587-
zend_coroutine_t *coroutine = Z_PTR_P(current);
588-
589-
if (coroutine->waker != NULL) {
590-
coroutine->waker->status = ZEND_ASYNC_WAKER_IGNORED;
591-
}
592-
593-
coroutine->event.dispose(&coroutine->event);
594-
595-
if (EG(exception)) {
596-
zend_exception_save();
597-
}
598-
}
599-
ZEND_HASH_FOREACH_END();
600-
}
601-
602574
static void cancel_queued_coroutines(void)
603575
{
604576
zend_exception_save();

0 commit comments

Comments
 (0)