MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / getnumlimit

Function getnumlimit

3rd/lua-5.4.3/src/lstrlib.c:1415–1421  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1413** than the maximum size for integers.
1414*/
1415static int getnumlimit (Header *h, const char **fmt, int df) {
1416 int sz = getnum(fmt, df);
1417 if (l_unlikely(sz > MAXINTSIZE || sz <= 0))
1418 return luaL_error(h->L, "integral size (%d) out of limits [1,%d]",
1419 sz, MAXINTSIZE);
1420 return sz;
1421}
1422
1423
1424/*

Callers 1

getoptionFunction · 0.85

Calls 2

getnumFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected