MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_tointegerx

Function lua_tointegerx

freebsd/contrib/openzfs/module/lua/lapi.c:346–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344
345
346LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {
347 TValue n;
348 const TValue *o = index2addr(L, idx);
349 if (tonumber(o, &n)) {
350 lua_Integer res;
351 lua_Number num = nvalue(o);
352 lua_number2integer(res, num);
353 if (isnum) *isnum = 1;
354 return res;
355 }
356 else {
357 if (isnum) *isnum = 0;
358 return 0;
359 }
360}
361
362
363LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *isnum) {

Callers 2

luaL_checkintegerFunction · 0.85
luaL_lenFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected