标签:
http://blog.csdn.net/cnjet/article/details/5909693
1. Two different way
lua_open can create a new lua_State. Every lua_State has its own execute environment. So, we can create more than one lua_State.
Way 1: Create a lua_State, load all lua script in it. Call functions in the lua_State, they share same global variables.
Way 2: Create a lua_State for every lua script. Every lua script work in its own lua_State.
2. Lua standard library
"luaL_openlibs" open all standard libraries. It‘s not necessarily, you can ignore it to reduce memory size.
Some ideas to embedding lua into C/C++
标签:
原文地址:http://www.cnblogs.com/gamekk/p/4779922.html