aboutsummaryrefslogtreecommitdiff
path: root/include/kpl/class.h
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-11-05 15:22:02 -0500
committernodist <kevin.comas.git@gmail.com>2026-11-05 15:22:02 -0500
commit7b9204a8680539bc4795a14f3d9a34e47981d0c3 (patch)
tree7aa69bba0c9cbee0cafb638fd49af64958dbb228 /include/kpl/class.h
parentfaa937cb09cd01f4ea94f5d7722a20e9c1246df0 (diff)
more objects and special slab for gc
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;