]>
git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/src/third_party/duktape-1.8.0/src-separate/duk_hnativefunction.h
2 * Heap native function representation.
5 #ifndef DUK_HNATIVEFUNCTION_H_INCLUDED
6 #define DUK_HNATIVEFUNCTION_H_INCLUDED
8 #define DUK_HNATIVEFUNCTION_NARGS_VARARGS ((duk_int16_t) -1)
9 #define DUK_HNATIVEFUNCTION_NARGS_MAX ((duk_int16_t) 0x7fff)
11 struct duk_hnativefunction
{
12 /* shared object part */
19 /* The 'magic' field allows an opaque 16-bit field to be accessed by the
20 * Duktape/C function. This allows, for instance, the same native function
21 * to be used for a set of very similar functions, with the 'magic' field
22 * providing the necessary non-argument flags / values to guide the behavior
23 * of the native function. The value is signed on purpose: it is easier to
24 * convert a signed value to unsigned (simply AND with 0xffff) than vice
27 * Note: cannot place nargs/magic into the heaphdr flags, because
28 * duk_hobject takes almost all flags already (and needs the spare).
32 #endif /* DUK_HNATIVEFUNCTION_H_INCLUDED */