lua_push*这些API是把C语言里面的值封装成Lua类型的值压入栈中的,对于那些需要垃圾回收的元素,在压入栈时,都会在Lua(也就是Lua虚拟机中)生成一个副本。比如lua_pushstring(lua_State *L, const char *s)会向中栈压入由s指向的以'\0'结尾的字符串,在C中调用这个函数后,我们可以任意释放或修改由s指向的...
luaL_loadbufferx(L, luaCFunction, sizeOfModule, moduleName, "t") where,Lis the lua state,luaCFunctionis the lua module wrapped in a C-style return statement,sizeOfModule,moduleNameandtis selfexplanatory. Right now luaL_loadbufferx is called in a loop for every module in my flash-drive, I...