MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / luaV_tointegerns

Function luaV_tointegerns

Dependencies/lua/src/lvm.c:139–148  ·  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

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

Callers 4

luaV_tointegerFunction · 0.85
luaV_equalobjFunction · 0.85
luaG_tointerrorFunction · 0.85
validopFunction · 0.85

Calls 1

luaV_flttointegerFunction · 0.85

Tested by

no test coverage detected