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.
27 lines
515 B
27 lines
515 B
=proto
|
|
int duk_is_c_function(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Returns 1 if value at <tt>index</tt> is a Function object and is
|
|
assocated with a C function, otherwise returns 0.
|
|
If <tt>index</tt> is invalid, also returns 0.</p>
|
|
|
|
<p>An example of an underlying C function observing the Duktape/C API
|
|
calling convention:</p>
|
|
<pre class="c-code">
|
|
int my_func(duk_context *ctx) {
|
|
/* ... */
|
|
}
|
|
</pre>
|
|
|
|
=example
|
|
if (duk_is_c_function(ctx, -3)) {
|
|
/* ... */
|
|
}
|
|
|
|
=tags
|
|
stack
|
|
function
|
|
|