From f1d54d70a80b86465c2df36eb95a0bcda8c26824 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 29 Aug 2025 23:20:48 +0800 Subject: add thread sharedata --- core/src/xmake/thread/queue_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/xmake/thread/queue_init.c') diff --git a/core/src/xmake/thread/queue_init.c b/core/src/xmake/thread/queue_init.c index 4c4e9a9f6..0c8af884d 100644 --- a/core/src/xmake/thread/queue_init.c +++ b/core/src/xmake/thread/queue_init.c @@ -33,12 +33,12 @@ /* ////////////////////////////////////////////////////////////////////////////////////// * private implementation */ -static tb_void_t xm_thread_queue_item_free(tb_element_ref_t element, tb_pointer_t buff) +static tb_void_t xm_thread_value_free(tb_element_ref_t element, tb_pointer_t buff) { - xm_thread_queue_item_t* item = (xm_thread_queue_item_t*)buff; + xm_thread_value_t* item = (xm_thread_value_t*)buff; if (item) { - if (item->kind == XM_THREAD_QUEUE_ITEM_STR) + if (item->kind == XM_THREAD_VALUE_STR) { if (item->u.string) tb_free((tb_pointer_t)item->u.string); item->u.string = tb_null; @@ -62,7 +62,7 @@ tb_int_t xm_thread_queue_init(lua_State* lua) tb_assert_and_check_break(thread_queue); thread_queue->refn = 1; - thread_queue->handle = tb_queue_init(0, tb_element_mem(sizeof(xm_thread_queue_item_t), xm_thread_queue_item_free, tb_null)); + thread_queue->handle = tb_queue_init(0, tb_element_mem(sizeof(xm_thread_value_t), xm_thread_value_free, tb_null)); tb_assert_and_check_break(thread_queue->handle); xm_lua_pushpointer(lua, (tb_pointer_t)thread_queue); -- cgit v1.3.1