mirror of https://github.com/svaarala/duktape.git
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
375 B
16 lines
375 B
=proto
|
|
void duk_swap_top(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... val1! ... val2! ] -> [ ... val2! ... val1! ]
|
|
|
|
=summary
|
|
<p>Swap stack top with value at <code>index</code>. If <code>index</code> refers
|
|
to the stack top, the call is a no-op. If the value stack is empty or
|
|
<code>index</code> is invalid, throws an error.</p>
|
|
|
|
=example
|
|
duk_swap_top(ctx, -3);
|
|
|
|
=tags
|
|
stack
|
|
|