diff --git a/lang/object.h b/lang/object.h index 6be4d63..05264db 100644 --- a/lang/object.h +++ b/lang/object.h @@ -7,17 +7,6 @@ #include "vm.h" #include -// Forward declare the class as we need it in object -struct object_class; - -// Object structure used by all classes -// Place this at the start of your private structure and cast accordingly -// Make sure to compile with -fno-strict-aliasing -struct object { - struct object_class *class_data; - atomic_int ref_count; -}; - // Dispatchable object call struct object_call { const char *name; @@ -31,6 +20,14 @@ *calls; // Points to array terminated by call with NULL name }; +// Object structure used by all classes +// Place this at the start of your private structure and cast accordingly +// Make sure to compile with -fno-strict-aliasing +struct object { + struct object_class *class_data; + atomic_int ref_count; +}; + // Adds a reference to an object void object_hold(Object obj);