diff --git a/moo/kernel/Class.moo b/moo/kernel/Class.moo index 64da4ce..9606a55 100644 --- a/moo/kernel/Class.moo +++ b/moo/kernel/Class.moo @@ -37,3 +37,9 @@ class(#pointer,#limited) Class(Apex) method nsup { ^self.nsup } method nsdic { ^self.nsdic } } + + +class(#pointer,#limited) Interface(Class) +{ +### TODO: fill this class with methods +} diff --git a/moo/lib/gc.c b/moo/lib/gc.c index 65f9210..199df6b 100644 --- a/moo/lib/gc.c +++ b/moo/lib/gc.c @@ -128,6 +128,15 @@ static kernel_class_info_t kernel_classes[] = MOO_OBJ_TYPE_OOP, MOO_OFFSETOF(moo_t, _class) }, + { 9, + { 'I','n','t','e','r','f','a','c','e' }, + MOO_CLASS_SELFSPEC_FLAG_LIMITED, + 0, + MOO_CLASS_NAMED_INSTVARS, + 1, + MOO_OBJ_TYPE_OOP, + MOO_OFFSETOF(moo_t, _interface) }, + { 6, { 'O','b','j','e','c','t' }, 0, diff --git a/moo/lib/moo.h b/moo/lib/moo.h index 9522b68..1f24afd 100644 --- a/moo/lib/moo.h +++ b/moo/lib/moo.h @@ -1384,15 +1384,16 @@ struct moo_t moo_oop_class_t _apex; /* Apex */ moo_oop_class_t _undefined_object; /* UndefinedObject */ moo_oop_class_t _class; /* Class */ + moo_oop_class_t _interface; /* Interface */ moo_oop_class_t _object; /* Object */ - moo_oop_class_t _string; /* String */ + moo_oop_class_t _string; /* String */ moo_oop_class_t _symbol; /* Symbol */ moo_oop_class_t _array; /* Array */ moo_oop_class_t _byte_array; /* ByteArray */ moo_oop_class_t _symbol_table; /* SymbolTable */ - moo_oop_class_t _dictionary; + moo_oop_class_t _dictionary; moo_oop_class_t _namespace; /* Namespace */ moo_oop_class_t _pool_dictionary; /* PoolDictionary */ moo_oop_class_t _method_dictionary; /* MethodDictionary */