You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lua_pcall exists. It is the entry point of the c-level safe call lua function in the lua source code, but there is no defind in the author's accompanying code.
页20, 倒数第三段
#define LUA_TNUMFLT (LUA_NUMBER | (0 << 4)) /浮点型/
#define LUA_TNUMINT (LUA_NUMBER | (1 << 4)) /整型/
这个定义与common/luaobject.h中的定义真好相反。
// lua number type
#define LUA_NUMINT (LUA_TNUMBER | (0 << 4))
#define LUA_NUMFLT (LUA_TNUMBER | (1 << 4))
页20, 倒数第二段。
当TValue中的类型是LUA_NUMFLT 时,TValue中的f域将被赋值。
这里的“f域”因该是“n”域吧?
页24, 例2-1
17 lua_pcall(L, 2, 1, 0)
找不到这个函数, 是不是因该改成luaL_pcall?
我看到你这本书上好几个地方都用到了lua_pcall 函数,是不是都应该,改为luaL_pcall?
The text was updated successfully, but these errors were encountered: