[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: pan shizhu <pan.shizhu@...>
- Date: Fri, 5 Feb 2010 10:53:28 +0800
>> 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.
I think this discription could be changed to: use your own copy of
luaL_openlibs(), given luaL_openlibs() a different name we can achive
it without touching linit.c.
Especially, this is important when you want to define more than one
lua state machine in a program with different libs. (If I need more
than one lua state machine, I often need different libs)
By moving the function into my own project it does seem good, to some
extent. If the official linit.c does not change very often.
- 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
- Re: How could I embedded socket in Lua internally, just like oslib, debuglib?, Luiz Henrique de Figueiredo