** returns the index for 'k' if 'k' is an appropriate key to live in ** the array part of a table, 0 otherwise. */
| 272 | ** the array part of a table, 0 otherwise. |
| 273 | */ |
| 274 | static unsigned int arrayindex (lua_Integer k) { |
| 275 | if (l_castS2U(k) - 1u < MAXASIZE) /* 'k' in [1, MAXASIZE]? */ |
| 276 | return cast_uint(k); /* 'key' is an appropriate array index */ |
| 277 | else |
| 278 | return 0; |
| 279 | } |
| 280 | |
| 281 | |
| 282 | /* |