define Protocol type correctly

This commit is contained in:
Bill Currie 2002-05-21 23:38:40 +00:00
parent 4315707008
commit 4697ce281e
2 changed files with 3 additions and 1 deletions

View File

@ -244,6 +244,7 @@ static keyword_t keywords[] = {
{"function", TYPE, &type_function, 0, PROG_VERSION},
{"id", TYPE, &type_id, 0, PROG_VERSION},
{"Class", TYPE, &type_Class, 0, PROG_VERSION},
{"Protocol", TYPE, &type_Protocol, 0, PROG_VERSION},
{"SEL", TYPE, &type_SEL, 0, PROG_VERSION},
{"IMP", TYPE, &type_IMP, 0, PROG_VERSION},
{"local", LOCAL, 0, 1, PROG_ID_VERSION},

View File

@ -433,6 +433,7 @@ init_types (void)
type = type_Class.aux_type = new_struct (0);
type->type = ev_class;
type->class = &class_Class;
class_Class.super_class = get_class ("Object", 1); //FIXME evil hack
class_Class.ivars = type_Class.aux_type;
new_struct_field (type, &type_Class, "class_pointer", vis_public);
new_struct_field (type, &type_Class, "super_class", vis_public);
@ -449,7 +450,7 @@ init_types (void)
new_struct_field (type, &type_pointer, "gc_object_type", vis_public);
chain_type (&type_Class);
type = type_Protocol.aux_type = new_struct ("Protocol");
type = type_Protocol.aux_type = new_struct (0);
type->type = ev_class;
type->class = &class_Protocol;
class_Protocol.ivars = type_Protocol.aux_type;