lua-users home
lua-l archive

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

于 2013-11-1 2:41, Paul K 写道:
Hi All,

Why are these calls commented out? Do they not need to be forwarded?
Or is it because the modules should not be using those and only the
"main" code should? Are there any modules that may need those?


IMHO, the proxy should and need forword just the public APIs (functions with the LUA_API annotation).
the luaopen_* routines are not of this kind - they are not intended be called by C modules.
Instead, they are functions that can be tailored(remember that Lua is an EMBEDDABLE language?).

FYI, the comments from linit.c[1] says this:

> ** If you embed Lua in your program and need to open the standard
> ** libraries, call luaL_openlibs in your program. If you need a
> ** different set of libraries, copy this file to your project and edit
> ** it to suit your needs.
> */