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

Function arrayindex

third-party/lua-5.3.5/src/ltable.c:144–151  ·  view source on GitHub ↗

** returns the index for 'key' if 'key' is an appropriate key to live in ** the array part of the table, 0 otherwise. */

Source from the content-addressed store, hash-verified

142** the array part of the table, 0 otherwise.
143*/
144static unsigned int arrayindex (const TValue *key) {
145 if (ttisinteger(key)) {
146 lua_Integer k = ivalue(key);
147 if (0 < k && (lua_Unsigned)k <= MAXASIZE)
148 return cast(unsigned int, k); /* 'key' is an appropriate array index */
149 }
150 return 0; /* 'key' did not match some condition */
151}
152
153
154/*

Callers 2

findindexFunction · 0.70
countintFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected