mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Get messages working again.
This commit is contained in:
parent
9e06220dc5
commit
d327c860cb
2 changed files with 5 additions and 11 deletions
|
@ -728,7 +728,7 @@ class_pointer_def (class_t *class)
|
|||
|
||||
class_type.c.class = class;
|
||||
|
||||
def = get_def (class->type,
|
||||
def = get_def (pointer_type (class->type),
|
||||
va ("_OBJ_CLASS_POINTER_%s", class->name),
|
||||
pr.scope, st_static);
|
||||
if (def->initialized)
|
||||
|
@ -792,7 +792,7 @@ class_finish_module (void)
|
|||
symtab_def->nosave = 1;
|
||||
symtab = &G_STRUCT (pr_symtab_t, symtab_def->ofs);
|
||||
if (selector_table_def) {
|
||||
symtab->sel_ref_cnt = selector_table_def->type->t.func.num_params;
|
||||
symtab->sel_ref_cnt = selector_table_def->type->t.array.size;
|
||||
EMIT_DEF (symtab->refs, selector_table_def);
|
||||
}
|
||||
symtab->cls_def_cnt = num_classes;
|
||||
|
|
|
@ -2836,21 +2836,15 @@ message_expr (expr_t *receiver, keywordarg_t *message)
|
|||
if (receiver->type == ex_error)
|
||||
return receiver;
|
||||
|
||||
if (!(rec_type->type == ev_pointer
|
||||
&& is_class (rec_type->t.fldptr.type))
|
||||
&& !is_class (rec_type))
|
||||
if (rec_type->type != ev_pointer
|
||||
|| !is_class (rec_type->t.fldptr.type))
|
||||
return error (receiver, "not a class/object");
|
||||
if (self) {
|
||||
class = extract_class (current_class);
|
||||
if (rec_type == &type_Class)
|
||||
class_msg = 1;
|
||||
} else {
|
||||
if (is_class (rec_type)) {
|
||||
class = rec_type->t.class;
|
||||
receiver = address_expr (receiver, 0, 0);
|
||||
} else {
|
||||
class = rec_type->t.fldptr.type->t.class;
|
||||
}
|
||||
class = rec_type->t.fldptr.type->t.class;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue