lua-users home
lua-l archive

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


>> 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.