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

Function treatstackoption

third-party/lua-5.5.0/src/ldblib.c:135–141  ·  view source on GitHub ↗

** In function 'db_getinfo', the call to 'lua_getinfo' may push ** results on the stack; later it creates the result table to put ** these objects. Function 'treatstackoption' puts the result from ** 'lua_getinfo' on top of the result table so that it can call ** 'lua_setfield'. */

Source from the content-addressed store, hash-verified

133** 'lua_setfield'.
134*/
135static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) {
136 if (L == L1)
137 lua_rotate(L, -2, 1); /* exchange object and table */
138 else
139 lua_xmove(L1, L, 1); /* move object to the "main" stack */
140 lua_setfield(L, -2, fname); /* put object into table */
141}
142
143
144/*

Callers 1

db_getinfoFunction · 0.70

Calls 3

lua_rotateFunction · 0.70
lua_xmoveFunction · 0.70
lua_setfieldFunction · 0.70

Tested by

no test coverage detected