diff options
Diffstat (limited to 'Include/classobject.h')
-rw-r--r-- | Include/classobject.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Include/classobject.h b/Include/classobject.h index ec07b59..ccab6a3 100644 --- a/Include/classobject.h +++ b/Include/classobject.h @@ -24,11 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Class object interface */ -/* -Classes are really hacked in at the last moment. -It should be possible to use other object types as base classes, -but currently it isn't. We'll see if we can fix that later, sigh... -*/ +/* Revealing some structures (not for general use) */ typedef struct { OB_HEAD @@ -37,6 +33,12 @@ typedef struct { object *cl_name; /* A string */ } classobject; +typedef struct { + OB_HEAD + classobject *in_class; /* The class object */ + object *in_dict; /* A dictionary */ +} instanceobject; + extern typeobject Classtype, Instancetype, Instancemethodtype; #define is_classobject(op) ((op)->ob_type == &Classtype) |