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.
19 lines
402 B
19 lines
402 B
=proto
|
|
duk_context *duk_require_context(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Like <code><a href="#duk_get_context">duk_get_context()</a></code>,
|
|
but throws an error if the value at <code>index</code> is not a Duktape
|
|
thread or if the index is invalid.</p>
|
|
|
|
=example
|
|
duk_context *new_ctx;
|
|
|
|
(void) duk_push_thread(ctx);
|
|
new_ctx = duk_require_context(ctx, -1);
|
|
|
|
=tags
|
|
stack
|
|
|