MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / setallfields

Function setallfields

extlibs/lua/src/loslib.c:228–238  ·  view source on GitHub ↗

** Set all fields from structure 'tm' in the table on top of the stack */

Source from the content-addressed store, hash-verified

226** Set all fields from structure 'tm' in the table on top of the stack
227*/
228static void setallfields (lua_State *L, struct tm *stm) {
229 setfield(L, "year", stm->tm_year, 1900);
230 setfield(L, "month", stm->tm_mon, 1);
231 setfield(L, "day", stm->tm_mday, 0);
232 setfield(L, "hour", stm->tm_hour, 0);
233 setfield(L, "min", stm->tm_min, 0);
234 setfield(L, "sec", stm->tm_sec, 0);
235 setfield(L, "yday", stm->tm_yday, 1);
236 setfield(L, "wday", stm->tm_wday, 1);
237 setboolfield(L, "isdst", stm->tm_isdst);
238}
239
240
241static int getboolfield (lua_State *L, const char *key) {

Callers 2

os_dateFunction · 0.85
os_timeFunction · 0.85

Calls 2

setfieldFunction · 0.85
setboolfieldFunction · 0.85

Tested by

no test coverage detected