From ed4ca21e21abbb1d765e417a9e1508ffd4919a9b Mon Sep 17 00:00:00 2001 From: actboy168 Date: Thu, 11 Jul 2024 16:23:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rd/lua/bee_assert.c | 5 ++++- 3rd/lua/bee_assert.h | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/3rd/lua/bee_assert.c b/3rd/lua/bee_assert.c index bcec9674..40971efb 100644 --- a/3rd/lua/bee_assert.c +++ b/3rd/lua/bee_assert.c @@ -1,12 +1,15 @@ #include "bee_assert.h" +#include "lauxlib.h" + void _bee_lua_assert(const char* message, const char* file, unsigned line) { fprintf(stderr, "(%s:%d) %s\n", file, line, message); fflush(stderr); abort(); } -void _bee_lua_apicheck(lua_State* L, const char* message, const char* file, unsigned line) { +void _bee_lua_apicheck(void* l, const char* message, const char* file, unsigned line) { + lua_State* L = l; fprintf(stderr, "(%s:%d) %s\n", file, line, message); fflush(stderr); if (!lua_checkstack(L, LUA_MINSTACK)) { diff --git a/3rd/lua/bee_assert.h b/3rd/lua/bee_assert.h index 527b54a0..ff198282 100644 --- a/3rd/lua/bee_assert.h +++ b/3rd/lua/bee_assert.h @@ -1,6 +1,4 @@ #pragma once -#include "lauxlib.h" - -void _bee_lua_assert(const char* message, const char* file, unsigned line); -void _bee_lua_apicheck(lua_State* L, const char* message, const char* file, unsigned line); +void _bee_lua_assert(const char*, const char*, unsigned); +void _bee_lua_apicheck(void*, const char*, const char*, unsigned);