'luaH_get' functions return tag of the result
Undoing previous commit. Returning TValue increases code size without any visible gains. Returning the tag is a little simpler than returning a special code (HOK/HNOTFOUND) and the tag is useful by itself in some cases.
This commit is contained in:
6
ltests.c
6
ltests.c
@@ -1538,7 +1538,8 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) {
|
||||
}
|
||||
else if EQ("getfield") {
|
||||
int t = getindex;
|
||||
lua_getfield(L1, t, getstring);
|
||||
int tp = lua_getfield(L1, t, getstring);
|
||||
lua_assert(tp == lua_type(L1, -1));
|
||||
}
|
||||
else if EQ("getglobal") {
|
||||
lua_getglobal(L1, getstring);
|
||||
@@ -1548,7 +1549,8 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) {
|
||||
lua_pushnil(L1);
|
||||
}
|
||||
else if EQ("gettable") {
|
||||
lua_gettable(L1, getindex);
|
||||
int tp = lua_gettable(L1, getindex);
|
||||
lua_assert(tp == lua_type(L1, -1));
|
||||
}
|
||||
else if EQ("gettop") {
|
||||
lua_pushinteger(L1, lua_gettop(L1));
|
||||
|
||||
Reference in New Issue
Block a user