MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / check_uint

Function check_uint

libaegisub/lua/utils.cpp:70–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70size_t check_uint(lua_State *L, int idx) {
71 auto v = lua_tointeger(L, idx);
72 if (v == 0 && !lua_isnumber(L, idx))
73 typerror(L, idx, "number");
74 if (v < 0)
75 argerror(L, idx, "must be >= 0");
76 return static_cast<size_t>(v);
77}
78
79void *check_udata(lua_State *L, int idx, const char *mt) {
80 void *p = lua_touserdata(L, idx);

Callers 4

ObjectDeleteMethod · 0.85
ObjectDeleteRangeMethod · 0.85
ObjectInsertMethod · 0.85
IterNextMethod · 0.85

Calls 2

typerrorFunction · 0.85
argerrorFunction · 0.85

Tested by

no test coverage detected