Use zig assert for apicheck#213
Conversation
Instead of only enabling api check in debug builds, expose an option to * enable apicheck * disable apicheck * enable in debug builds This gives users more control.
Move it to the base build file
Luajit also supports apicheck. Enabling uncovered an error in opening the bit32 library which is fixed by using call().
|
It's looking like it might not be possible to get this working in Lua 5.5 currently. Other versions of Lua work like this:
Lua 5.5 removed I tried patching the lapi.h header file to remove those definitions, but since headers are searched for in directories I couldn't find a way to exclude the original unpatched lapi.h. Maybe copy all of the other headers and the patched header to a new directory? I'm considering posting on the Lua mailing list about this change in behavior in Lua 5.5 and see what comes up |
|
@natecraddock looking through the source, I suspect one can do #undefine LUA_USE_APICHECK
#define api_check(l,e,msg) zlua_assert(l,e,msg)hmmm... apparently not... |
Using a zig assert for apicheck enables stack traces for panics.
TODO:
lua_assertcorrectly