|
The good news is that lmathlib.c from 5.2 can be used in 5.1 with just these simple fixes: #ifdef lmathlib_c #define luaL_checkunsigned luaL_checkint #define LUAMOD_API LUALIB_API #define luaL_newlib(L,x) luaL_register(L, LUA_MATHLIBNAME, x) #define LUA_COMPAT_LOG10 #endif