lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "Antonin" == Antonin Décimo <antonin.decimo@gmail.com> writes:

 Antonin> The problem is with luaL_register. With 5.3, it is an alias
 Antonin> for luaL_openlib, that is exported only if LUA_COMPAT_MODULE
 Antonin> is defined during compilation, which neither Debian nor
 Antonin> Homebrew seem to do.

How about,

#if LUA_VERSION_NUM < 502
#define luaL_newlib(L_,f_) (lua_newtable(L_), luaL_register((L_),NULL,(f_)))
#endif

and use  luaL_newlib(L, fns);  where you currently have newtable/register

-- 
Andrew.