From 18052989d5722ba9fe01361b53b98330198dbb1e Mon Sep 17 00:00:00 2001 From: Andrew D. France Date: Wed, 23 Jul 2025 01:24:29 -0500 Subject: - The premake5.lua file has been updated to include the LUA_COMPAT_BITLIB compiler definition. This flag instructs the compat-5.3 submodule to build the actual bit32 library instead of a stub that throws a deprecated error. - The main function in src/lush.c is modified to explicitly load the bit32 and utf8 libraries into the global Lua state at startup using luaL_requiref. This makes them directly accessible to all scripts running in the shell, which is necessary for the test script to find and use the bit32 functions without a require() call. - Added a null check after luaL_newstate() in src/lush.c to ensure the Lua state is created successfully before its actually used. --- premake5.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'premake5.lua') diff --git a/premake5.lua b/premake5.lua index 3ec299a..1043c07 100644 --- a/premake5.lua +++ b/premake5.lua @@ -39,7 +39,7 @@ files({ "lib/compat53/ltablib.c", "lib/compat53/lutf8lib.c" }) -defines({ 'LUSH_VERSION="0.3.2"', 'COMPAT53_PREFIX=""' }) +defines({ 'LUSH_VERSION="0.3.2"', 'COMPAT53_PREFIX=""', 'LUA_COMPAT_BITLIB' }) filter("configurations:Debug") defines({ "DEBUG" }) -- cgit v1.2.3-59-g8ed1b