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.
22 lines
603 B
22 lines
603 B
=proto
|
|
duk_c_function duk_get_c_function(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Get the Duktape/C function pointer (a <code>duk_c_function</code>) from an
|
|
Ecmascript function object associated with a Duktape/C function. If the
|
|
value is not such a function or <code>index</code> is invalid, returns <code>NULL</code>.</p>
|
|
|
|
<p>If you prefer an error to be thrown for an invalid value or index, use
|
|
<code><a href="#duk_require_c_function">duk_require_c_function()</a></code>.</p>
|
|
|
|
=example
|
|
duk_c_function funcptr;
|
|
|
|
funcptr = duk_get_c_function(ctx, -3);
|
|
|
|
=tags
|
|
stack
|
|
function
|
|
|