[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LUA from C: open libraries, differencies between base and string
- From: Andrew Gierth <andrew@...>
- Date: Mon, 11 May 2020 17:24:29 +0100
>>>>> "Massimo" == Massimo Sala <massimo.sala.71@gmail.com> writes:
Massimo> Hi
Massimo> I am using this code to load the two libraries:
Massimo> luaopen_base(L);
Massimo> lua_pop(L, 1);
Massimo> luaopen_string(L);
Massimo> lua_setglobal(L, "string");
You shouldn't be doing that; see luaL_openlibs if you want all the
libraries, or see luaL_requiref (and the code for luaL_openlibs in
linit.c) to load only specific ones.
--
Andrew.
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org