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

Function lua_tonumberx

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

Source from the content-addressed store, hash-verified

330
331
332LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) {
333 TValue n;
334 const TValue *o = index2addr(L, idx);
335 if (tonumber(o, &n)) {
336 if (isnum) *isnum = 1;
337 return nvalue(o);
338 }
339 else {
340 if (isnum) *isnum = 0;
341 return 0;
342 }
343}
344
345
346LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {

Callers 2

luaB_tonumberFunction · 0.85
luaL_checknumberFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected