diff --git a/src/ccall.h b/src/ccall.h new file mode 100644 index 0000000..4a1d5bb --- /dev/null +++ b/src/ccall.h @@ -0,0 +1,20 @@ +#ifndef _CCALL_H +#define _CCALL_H + +/* + Extern C-CALL API + C functioncs can be registered and called via plx (CCALL). +*/ +typedef struct { + char* name; + int (*foo)(); + int8_t nargs; // -1: varargs, top of stack contains nargs + int8_t nret; + index_t next; // index of next first character group +} ccall_t; + +extern ccall_t *ccalls; + +void CCallInit(ccall_t *_ccalls); + +#endif