** returns the index for 'key' if 'key' is an appropriate key to live in ** the array part of the table, 0 otherwise. */
| 150 | ** the array part of the table, 0 otherwise. |
| 151 | */ |
| 152 | static unsigned int arrayindex(const TValue *key) { |
| 153 | if (ttisinteger(key)) { |
| 154 | lua_Integer k = ivalue(key); |
| 155 | if (0 < k && (lua_Unsigned)k <= MAXASIZE) |
| 156 | return lua_cast(unsigned int, k); /* 'key' is an appropriate array index */ |
| 157 | } |
| 158 | return 0; /* 'key' did not match some condition */ |
| 159 | } |
| 160 | |
| 161 | |
| 162 | /* |
no outgoing calls
no test coverage detected