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

Function luaV_tointegerns

extlibs/lua/src/lvm.c:137–146  ·  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

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

Callers 1

luaV_tointegerFunction · 0.85

Calls 1

luaV_flttointegerFunction · 0.85

Tested by

no test coverage detected