aboutsummaryrefslogtreecommitdiff
path: root/include/kpl/class.h
blob: 0842db21778afaceba483ec68e332120f266d29a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * The kpl class a 64bit value with a table of functions
 */

#pragma once

/*
 * How to traverse the object and mark kpl_object_gc
 */
typedef void kpl_interface_gc_mark_object_fn(void *object);

typedef struct {
    // TODO
    kpl_interface_gc_mark_object_fn *gc_mark_object_fn;
} kpl_interface;

typedef struct {
    kpl_value64 value;
    kpl_interface *interface;
} kpl_class;