Lua 最终版

来源:互联网 发布:有c语言基础学java 编辑:程序博客网 时间:2024/06/02 11:26
GetValue(L, 1, value); //1 in the bottomGetValue(L, 2, value); //2 bottom+1GetValue(L, 3, value); //3 bottom+2//等价于GetValue(L, -3, value); //top-2GetValue(L, -2, value); //top-1GetValue(L, -1, value); //in the topvoid GetValue(lua_State *L , int index, string &value){    int iParam = 0;    const char *pParam = lua_tolstring(L, index, &iParam);    if(pParam)    {        value = string(pParam, iParam);    }}



0 0
原创粉丝点击