MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / getfield

Function getfield

third-party/lua-5.1.5/src/loslib.c:109–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108
109static int getfield (lua_State *L, const char *key, int d) {
110 int res;
111 lua_getfield(L, -1, key);
112 if (lua_isnumber(L, -1))
113 res = (int)lua_tointeger(L, -1);
114 else {
115 if (d < 0)
116 return luaL_error(L, "field " LUA_QS " missing in date table", key);
117 res = d;
118 }
119 lua_pop(L, 1);
120 return res;
121}
122
123
124static int os_date (lua_State *L) {

Callers 1

os_timeFunction · 0.70

Calls 4

lua_getfieldFunction · 0.70
lua_isnumberFunction · 0.70
lua_tointegerFunction · 0.70
luaL_errorFunction · 0.70

Tested by

no test coverage detected