From 36b82667d32b72cca9feb3eeb20d13e46be0d5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jerry=20Lundstr=C3=B6m?= Date: Fri, 8 Mar 2024 09:12:48 +0100 Subject: [PATCH] thread push number - `core.thread`: Issue #233: Fix runtime error, use correct declaration --- src/core/thread.c | 2 +- src/core/thread.h | 1 - src/core/thread.hh | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/thread.c b/src/core/thread.c index 434ea07d..bf0cdcd2 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -185,7 +185,7 @@ void core_thread_push_string(core_thread_t* self, const char* str, size_t len) _push(self, item); } -void core_thread_push_number(core_thread_t* self, lua_Number num) +void core_thread_push_number(core_thread_t* self, double num) { core_thread_item_t* item; mlassert_self(); diff --git a/src/core/thread.h b/src/core/thread.h index 31d84f0d..f6a05768 100644 --- a/src/core/thread.h +++ b/src/core/thread.h @@ -25,7 +25,6 @@ #include #include -#include #include diff --git a/src/core/thread.hh b/src/core/thread.hh index 1b92959e..206f439b 100644 --- a/src/core/thread.hh +++ b/src/core/thread.hh @@ -27,8 +27,8 @@ struct core_thread_item { void* ptr; char * type, *module; - char* str; - lua_Number num; + char* str; + double num; }; typedef struct core_thread { @@ -52,5 +52,5 @@ int core_thread_start(core_thread_t* self, const char* byt int core_thread_stop(core_thread_t* self); void core_thread_push(core_thread_t* self, void* ptr, const char* type, size_t type_len, const char* module, size_t module_len); void core_thread_push_string(core_thread_t* self, const char* str, size_t len); -void core_thread_push_number(core_thread_t* self, lua_Number num); +void core_thread_push_number(core_thread_t* self, double num); const core_thread_item_t* core_thread_pop(core_thread_t* self);