10#include "mjs_ffi_public.h"
11#include "mjs_internal.h"
13#if defined(__cplusplus)
17#define MJS_CB_ARGS_MAX_CNT 6
18#define MJS_CB_SIGNATURE_MAX_SIZE (MJS_CB_ARGS_MAX_CNT + 1 )
20typedef uint8_t mjs_ffi_ctype_t;
47 mjs_ffi_ctype_t val_types[MJS_CB_SIGNATURE_MAX_SIZE];
63 unsigned is_callback : 1;
64 unsigned is_valid : 1;
79MJS_PRIVATE mjs_val_t mjs_mk_ffi_sig(
struct mjs*
mjs);
84MJS_PRIVATE
int mjs_is_ffi_sig(mjs_val_t v);
89MJS_PRIVATE mjs_val_t mjs_ffi_sig_to_value(
struct mjs_ffi_sig* psig);
94MJS_PRIVATE
struct mjs_ffi_sig* mjs_get_ffi_sig_struct(mjs_val_t v);
99MJS_PRIVATE
void mjs_ffi_sig_destructor(
struct mjs*
mjs,
void* psig);
101MJS_PRIVATE
int mjs_ffi_sig_set_val_type(
mjs_ffi_sig_t* sig,
int idx, mjs_ffi_ctype_t type);
104MJS_PRIVATE
int mjs_ffi_is_regular_word(mjs_ffi_ctype_t type);
105MJS_PRIVATE
int mjs_ffi_is_regular_word_or_void(mjs_ffi_ctype_t type);
120MJS_PRIVATE mjs_err_t mjs_ffi_call(
struct mjs*
mjs);
126MJS_PRIVATE mjs_err_t mjs_ffi_call2(
struct mjs*
mjs);
128MJS_PRIVATE
void mjs_ffi_cb_free(
struct mjs*);
129MJS_PRIVATE
void mjs_ffi_args_free_list(
struct mjs*
mjs);
131#if defined(__cplusplus)