summaryrefslogtreecommitdiffhomepage
path: root/lib.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-26 13:28:07 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commitbf8522625f55fa2657dee3b9356b20fa0dba725f (patch)
tree82dea1608c84f4b6314f2500271258e4455ecf9d /lib.h
parente2b3d2ef25c5e55122c1e41ab56af1075209b47d (diff)
treewide: move ressource type registry into vm instance
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib.h b/lib.h
index 2d27b04..5425da2 100644
--- a/lib.h
+++ b/lib.h
@@ -94,7 +94,7 @@ uc_to_int64(uc_value_t *v)
/* ressource type helper */
static inline uc_ressource_type_t *
-_uc_declare_type(const char *name, const uc_cfunction_list *list, size_t len, void (*freefn)(void *))
+_uc_declare_type(uc_vm *vm, const char *name, const uc_cfunction_list *list, size_t len, void (*freefn)(void *))
{
uc_value_t *proto = ucv_object_new(NULL);
@@ -102,11 +102,11 @@ _uc_declare_type(const char *name, const uc_cfunction_list *list, size_t len, vo
ucv_object_add(proto, list[len].name,
ucv_cfunction_new(list[len].name, list[len].func));
- return ucv_ressource_type_add(name, proto, freefn);
+ return ucv_ressource_type_add(vm, name, proto, freefn);
}
-#define uc_declare_type(name, functions, freefn) \
- _uc_declare_type(name, functions, ARRAY_SIZE(functions), freefn)
+#define uc_declare_type(vm, name, functions, freefn) \
+ _uc_declare_type(vm, name, functions, ARRAY_SIZE(functions), freefn)
/* prototype helper */