Browse Source

Merge pull request #2066 from svaarala/apidoc-xmove-args

Fix duk_xmove_top() API doc argument order
pull/1567/merge
Sami Vaarala 6 years ago
committed by GitHub
parent
commit
959f7e7947
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      website/api/duk_xmove_top.yaml

4
website/api/duk_xmove_top.yaml

@ -42,13 +42,13 @@ example: |
* the target stack allocation explicitly.
*/
duk_require_stack(new_ctx, nargs);
duk_xmove_top(ctx, new_ctx, nargs);
duk_xmove_top(new_ctx, ctx, nargs);
/* Call the function; new_ctx is now: [ func arg1 ... argN ]. */
duk_call(new_ctx, nargs - 1);
/* Return the function call result by copying it to the original stack. */
duk_xmove_top(new_ctx, ctx, 1);
duk_xmove_top(ctx, new_ctx, 1);
return 1;
}

Loading…
Cancel
Save