From 12b706d0276417b1a5ac7197ed75e9d1f27827cd Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 16 Mar 2026 11:10:45 +0100 Subject: [PATCH] Mon 16 Mar 11:09:06 CET 2026 --- src/ccall.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ccall.h 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