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

Function getnumlimit

third-party/lua-5.5.0/src/lstrlib.c:1470–1476  ·  view source on GitHub ↗

** Read an integer numeral and raises an error if it is larger ** than the maximum size of integers. */

Source from the content-addressed store, hash-verified

1468** than the maximum size of integers.
1469*/
1470static unsigned getnumlimit (Header *h, const char **fmt, size_t df) {
1471 size_t sz = getnum(fmt, df);
1472 if (l_unlikely((sz - 1u) >= MAXINTSIZE))
1473 return cast_uint(luaL_error(h->L,
1474 "integral size (%d) out of limits [1,%d]", sz, MAXINTSIZE));
1475 return cast_uint(sz);
1476}
1477
1478
1479/*

Callers 1

getoptionFunction · 0.70

Calls 2

getnumFunction · 0.70
luaL_errorFunction · 0.70

Tested by

no test coverage detected