2024-03-27 10:49:10 +00:00
|
|
|
#ifndef MK_NATIVE_H
|
|
|
|
#define MK_NATIVE_H
|
|
|
|
|
|
|
|
#include "commons.h"
|
|
|
|
#include "vec.h"
|
|
|
|
|
|
|
|
struct moka;
|
|
|
|
|
|
|
|
typedef MOKA (*native_fun_t)(struct moka*, struct vec* args);
|
|
|
|
|
|
|
|
struct native
|
|
|
|
{
|
|
|
|
native_fun_t fun;
|
2024-03-30 16:24:52 +00:00
|
|
|
int arity;
|
2024-03-27 10:49:10 +00:00
|
|
|
};
|
|
|
|
|
2024-03-30 16:24:52 +00:00
|
|
|
void native_init(struct native* self,
|
|
|
|
native_fun_t fun,
|
|
|
|
int arity);
|
2024-03-27 10:49:10 +00:00
|
|
|
void native_free(struct native* self);
|
|
|
|
|
|
|
|
#endif
|