[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How could I embedded socket in Lua internally, just like oslib, debuglib?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 5 Feb 2010 00:03:34 -0200
> If you dive into the source code of lua.c, and see how it calls the
> luaL_openlibs you will found that it has no special environment
> prepared for luaL_openlibs.
The environment is part of the lua_call: luaopen_* are called in the current
Lua environment.
> The advantage of not touching linit.c is: you will never need to
> compile lua source code again and you can even remove lua source code
> from your project. Just keep a static library of lua is enough.
Exactly my point. Use your own copy of linit.c in your C project.
> So IMO you can freely modify lua.c.
Sure. My point is just that if you only need to change the set of libraries
loaded by your host or by lua.c, it's much easier to maintain a copy of linit.c.
- References:
- How could I embedded socket in Lua internally, just like oslib, debuglib?, sagasw
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, Jerome Vuarand
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, sagasw
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, pan shizhu
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, Luiz Henrique de Figueiredo
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, pan shizhu