aboutsummaryrefslogtreecommitdiff
path: root/include/kpl/class.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kpl/class.h')
-rw-r--r--include/kpl/class.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/kpl/class.h b/include/kpl/class.h
index 0842db2..d1c836e 100644
--- a/include/kpl/class.h
+++ b/include/kpl/class.h
@@ -9,12 +9,24 @@
*/
typedef void kpl_interface_gc_mark_object_fn(void *object);
+/*
+ * A free for objects allocated outside the kpl allocator, wrapped in a kpl_object_native
+ */
+typedef void kpl_interface_native_free_fn(kpl_object_native *object_native);
+
+/*
+ * `log operator
+ */
+typedef void kpl_interface_log_fn(kpl_thread *thread, void *object);
+
typedef struct {
// TODO
kpl_interface_gc_mark_object_fn *gc_mark_object_fn;
+ kpl_interface_native_free_fn *native_free_fn;
+ kpl_interface_log_fn *log_fn;
} kpl_interface;
typedef struct {
kpl_value64 value;
- kpl_interface *interface;
+ const kpl_interface *interface;
} kpl_class;