lua-users home
lua-l archive

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

On Tue, 9 Jun 2020 15:47:13 +0200, Milan Obuch <> wrote:

> On Tue, 9 Jun 2020 10:21:33 -0300, Luiz Henrique de Figueiredo
> <> wrote:
> > > test-lua.c:135:2: warning: implicit declaration of function
> > > 'luaL_openlib' is invalid in C99
> > > [-Wimplicit-function-declaration]    
> > 
> > Compile your program with -DLUA_COMPAT_MODULE  
> Thank you, this works. In lauxlib.h I see this is for compatibility
> with old module system, is there some replacement in new Lua world
> without module?

No one?

Also, additional question - following definition

#define ARRAY_REGID  "22d3fa81-aef3-4335-be43-6ff037daf78e"

used later in

luaL_newmetatable(L, ARRAY_REGID);

Looking in Reference Manual, second argument is just char pointer, so I
could basically use any name, it does not need to be such special
string as used in cited example, right? Even meaningfull ones as 'dog',
'cat' etc. yes?

Also, there is mention of a registry, where new metatable is being put,
but I did not find any definition of this registry. Maybe I did not
look into the right place, but where could definition of registry be