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

Function luaV_tointegerns

third-party/lua-5.5.0/src/lvm.c:142–151  ·  view source on GitHub ↗

** try to convert a value to an integer, rounding according to 'mode', ** without string coercion. ** ("Fast track" handled by macro 'tointegerns'.) */

Source from the content-addressed store, hash-verified

140** ("Fast track" handled by macro 'tointegerns'.)
141*/
142int luaV_tointegerns (const TValue *obj, lua_Integer *p, F2Imod mode) {
143 if (ttisfloat(obj))
144 return luaV_flttointeger(fltvalue(obj), p, mode);
145 else if (ttisinteger(obj)) {
146 *p = ivalue(obj);
147 return 1;
148 }
149 else
150 return 0;
151}
152
153
154/*

Callers 3

luaV_tointegerFunction · 0.70
luaG_tointerrorFunction · 0.70
validopFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected