6#ifndef MJS_FFI_PUBLIC_H_
7#define MJS_FFI_PUBLIC_H_
9#include "mjs_core_public.h"
11#if defined(__cplusplus)
17 MJS_FFI_CTYPE_USERDATA,
18 MJS_FFI_CTYPE_CALLBACK,
23 MJS_FFI_CTYPE_CHAR_PTR,
24 MJS_FFI_CTYPE_VOID_PTR,
25 MJS_FFI_CTYPE_STRUCT_MG_STR_PTR,
26 MJS_FFI_CTYPE_STRUCT_MG_STR,
27 MJS_FFI_CTYPE_INVALID,
30typedef void*(mjs_ffi_resolver_t)(
void* handle,
const char* symbol);
32void mjs_set_ffi_resolver(
struct mjs*
mjs, mjs_ffi_resolver_t* dlsym,
void* handle);
34void* mjs_ffi_resolve(
struct mjs*
mjs,
const char* symbol);
36#if defined(__cplusplus)