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);