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.
34 lines
811 B
34 lines
811 B
11 years ago
|
=proto
|
||
|
void duk_push_thread_stash(duk_context *ctx, duk_context *target_ctx) {
|
||
|
|
||
|
=stack
|
||
|
[ ... ] -> [ ... stash! ]
|
||
|
|
||
|
=summary
|
||
11 years ago
|
<p>Push the stash object related to <code>target_ctx</code> to the stack (the
|
||
|
<code>ctx</code> and <code>target_ctx</code> arguments may refer to the same
|
||
|
thread). The thread stash is an internal object which can be used to store
|
||
|
key/value pairs from C code so that they are reachable for garbage collection,
|
||
|
but are not accessible from Ecmascript code. The stash is only accessible
|
||
|
from C code with a matching <code>target_ctx</code> argument.</p>
|
||
11 years ago
|
|
||
|
<p>If <code>target_ctx</code> is <code>NULL</code>, throws an error.</p>
|
||
|
|
||
|
=example
|
||
|
duk_push_thread_stash(ctx, ctx2);
|
||
|
|
||
|
=tags
|
||
|
stack
|
||
|
stash
|
||
|
object
|
||
11 years ago
|
module
|
||
11 years ago
|
thread
|
||
10 years ago
|
sandbox
|
||
11 years ago
|
|
||
|
=seealso
|
||
|
duk_push_heap_stash
|
||
|
duk_push_global_stash
|
||
10 years ago
|
|
||
|
=introduced
|
||
|
1.0.0
|