MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_tointegerx

Function lua_tointegerx

depends/lua/src/lapi.c:356–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354
355
356LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) {
357 lua_Integer res;
358 const TValue *o = index2addr(L, idx);
359 int isnum = tointeger(o, &res);
360 if (!isnum)
361 res = 0; /* call to 'tointeger' may change 'n' even if it fails */
362 if (pisnum) *pisnum = isnum;
363 return res;
364}
365
366
367LUA_API int lua_toboolean (lua_State *L, int idx) {

Callers 7

lua_writeMethod · 0.85
decode_matinfoFunction · 0.85
units_assignTrainerFunction · 0.85
math_tointFunction · 0.85
luaL_checkintegerFunction · 0.85
lua_IntegerFunction · 0.85
getfieldFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected