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.
 
 
 
 
 
 

31 lines
620 B

name: duk_is_c_function
proto: |
duk_bool_t duk_is_c_function(duk_context *ctx, duk_idx_t idx);
stack: |
[ ... val! ... ]
summary: |
<p>Returns 1 if value at <code>idx</code> is a Function object and is
assocated with a C function, otherwise returns 0.
If <code>idx</code> 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
introduced: 1.0.0