lua-users home
lua-l archive

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

>>>>> "Antonin" == Antonin Décimo <> 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,

#define luaL_newlib(L_,f_) (lua_newtable(L_), luaL_register((L_),NULL,(f_)))

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