You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
506 B

=proto
int duk_normalize_index(duk_context *ctx, int index);
=summary
<p>
Normalize argument index relative to the bottom of the current frame.
The resulting index will be 0 or greater and will be independent of
later stack modifications. If the input index is invalid, returns
<tt>DUK_INVALID_INDEX</tt>. If you prefer that an error be thrown for
an invalid index, use
<tt><a href="#duk_require_normalize_index">duk_require_normalize_index()</a></tt>.
</p>
=example
int idx = duk_normalize_index(-3);