diff --git a/include/swoole.h b/include/swoole.h index 6c317d8e7a5..a95ea02a6bd 100644 --- a/include/swoole.h +++ b/include/swoole.h @@ -1758,7 +1758,7 @@ int swReactor_setHandle(swReactor *, int, swReactor_handle); int swReactor_empty(swReactor *reactor); void swReactor_defer_task_create(swReactor *reactor); -void swReactor_defer_task_destory(swReactor *reactor); +void swReactor_defer_task_destroy(swReactor *reactor); static sw_inline swConnection* swReactor_get(swReactor *reactor, int fd) { diff --git a/php_swoole.h b/php_swoole.h index ca6636da3b7..ef6665146e9 100644 --- a/php_swoole.h +++ b/php_swoole.h @@ -389,7 +389,7 @@ PHP_FUNCTION(swoole_fast_serialize); PHP_FUNCTION(swoole_unserialize); #endif -void swoole_destory_table(zend_resource *rsrc); +void swoole_destroy_table(zend_resource *rsrc); void swoole_server_port_init(int module_number); void swoole_async_init(int module_number); diff --git a/src/core/array.c b/src/core/array.c index a3af6b80602..ad0676c67e5 100644 --- a/src/core/array.c +++ b/src/core/array.c @@ -47,7 +47,7 @@ swArray *swArray_new(int page_size, size_t item_size) } /** - * Destory the array + * Destroy the array */ void swArray_free(swArray *array) { diff --git a/src/memory/ring_buffer.c b/src/memory/ring_buffer.c index faafb71b600..4258d3e579b 100644 --- a/src/memory/ring_buffer.c +++ b/src/memory/ring_buffer.c @@ -36,7 +36,7 @@ typedef struct char data[0]; } swRingBuffer_item; -static void swRingBuffer_destory(swMemoryPool *pool); +static void swRingBuffer_destroy(swMemoryPool *pool); static void* swRingBuffer_alloc(swMemoryPool *pool, uint32_t size); static void swRingBuffer_free(swMemoryPool *pool, void *ptr); @@ -70,7 +70,7 @@ swMemoryPool *swRingBuffer_new(uint32_t size, uint8_t shared) mem = (char *) mem + sizeof(swMemoryPool); pool->object = object; - pool->destroy = swRingBuffer_destory; + pool->destroy = swRingBuffer_destroy; pool->free = swRingBuffer_free; pool->alloc = swRingBuffer_alloc; @@ -198,7 +198,7 @@ static void swRingBuffer_free(swMemoryPool *pool, void *ptr) sw_atomic_fetch_add(free_count, 1); } -static void swRingBuffer_destory(swMemoryPool *pool) +static void swRingBuffer_destroy(swMemoryPool *pool) { swRingBuffer *object = pool->object; if (object->shared) diff --git a/src/reactor/defer_task.cc b/src/reactor/defer_task.cc index a7d056baf98..9fc7f99acd2 100644 --- a/src/reactor/defer_task.cc +++ b/src/reactor/defer_task.cc @@ -43,7 +43,7 @@ void swReactor_defer_task_create(swReactor *reactor) reactor->do_defer_tasks = do_defer_tasks; } -void swReactor_defer_task_destory(swReactor *reactor) +void swReactor_defer_task_destroy(swReactor *reactor) { list *tasks = (list *) reactor->defer_tasks; delete tasks; diff --git a/swoole_msgqueue.c b/swoole_msgqueue.c index 568efc4a5d5..5af11c963ae 100644 --- a/swoole_msgqueue.c +++ b/swoole_msgqueue.c @@ -22,7 +22,7 @@ static PHP_METHOD(swoole_msgqueue, push); static PHP_METHOD(swoole_msgqueue, pop); static PHP_METHOD(swoole_msgqueue, setBlocking); static PHP_METHOD(swoole_msgqueue, stats); -static PHP_METHOD(swoole_msgqueue, destory); +static PHP_METHOD(swoole_msgqueue, destroy); static zend_class_entry swoole_msgqueue_ce; zend_class_entry *swoole_msgqueue_class_entry_ptr; @@ -55,7 +55,7 @@ static const zend_function_entry swoole_msgqueue_methods[] = PHP_ME(swoole_msgqueue, pop, arginfo_swoole_msgqueue_pop, ZEND_ACC_PUBLIC) PHP_ME(swoole_msgqueue, setBlocking, arginfo_swoole_msgqueue_setBlocking, ZEND_ACC_PUBLIC) PHP_ME(swoole_msgqueue, stats, arginfo_swoole_void, ZEND_ACC_PUBLIC) - PHP_ME(swoole_msgqueue, destory, arginfo_swoole_void, ZEND_ACC_PUBLIC) + PHP_ME(swoole_msgqueue, destroy, arginfo_swoole_void, ZEND_ACC_PUBLIC) PHP_FE_END }; @@ -169,7 +169,7 @@ static PHP_METHOD(swoole_msgqueue, stats) } } -static PHP_METHOD(swoole_msgqueue, destory) +static PHP_METHOD(swoole_msgqueue, destroy) { swMsgQueue *queue = swoole_get_object(getThis()); SW_CHECK_RETURN(swMsgQueue_free(queue)); diff --git a/tests/swoole_coroutine/swap_callback/log.phpt b/tests/swoole_coroutine/swap_callback/log.phpt index 30fdd109a87..0e5601b6a4c 100644 --- a/tests/swoole_coroutine/swap_callback/log.phpt +++ b/tests/swoole_coroutine/swap_callback/log.phpt @@ -13,7 +13,7 @@ co::onSwap(function (int $state, int $cid, int $origin_cid) { $cid1 = $origin_cid; $cid2 = $cid; break; - case SWOOLE_CORO_WATING: + case SWOOLE_CORO_WAITING: $state = 'yield'; $cid1 = $cid; $cid2 = $origin_cid;