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.
23 lines
708 B
23 lines
708 B
=proto
|
|
void duk_push_current_function(duk_context *ctx);
|
|
|
|
=stack
|
|
[ ... ] -> [ ... func! ] (if current function exists)
|
|
[ ... ] -> [ ... undefined! ] (if no current function)
|
|
|
|
=summary
|
|
<p>Push the currently running function to the stack. The value pushed is
|
|
an Ecmascript Function object. If there is no current function,
|
|
<code>undefined</code> is pushed instead.</p>
|
|
|
|
<p>This function allows a C function to gain access to its function object.
|
|
Since multiple function objects can internally point to the same C function,
|
|
a function object is a convenient place for function parameterization and
|
|
can also act as an internal state stash.</p>
|
|
|
|
=example
|
|
duk_push_current_function(ctx);
|
|
|
|
=tags
|
|
stack
|
|
function
|
|
|