mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
fix a bug with obj_msgSend and obj_msgSend_super when more than one file is
compiled
This commit is contained in:
parent
1e49f0d0c3
commit
5f65a53e81
1 changed files with 2 additions and 17 deletions
|
@ -59,9 +59,6 @@ static const char rcsid[] =
|
|||
#include "struct.h"
|
||||
#include "type.h"
|
||||
|
||||
static def_t *send_message_def;
|
||||
static def_t *send_message_super_def;
|
||||
|
||||
method_t *
|
||||
new_method (type_t *ret_type, param_t *selector, param_t *opt_parms)
|
||||
{
|
||||
|
@ -170,27 +167,15 @@ new_keywordarg (const char *selector, struct expr_s *expr)
|
|||
return k;
|
||||
}
|
||||
|
||||
static void
|
||||
make_message_def (const char *name, def_t **def)
|
||||
{
|
||||
expr_t *zero = new_expr ();
|
||||
|
||||
zero->type = ex_integer;
|
||||
*def = get_def (&type_IMP, name, pr.scope, st_extern);
|
||||
}
|
||||
|
||||
expr_t *
|
||||
send_message (int super)
|
||||
{
|
||||
expr_t *e;
|
||||
|
||||
if (!send_message_def) {
|
||||
make_message_def ("obj_msgSend", &send_message_def);
|
||||
make_message_def ("obj_msgSend_super", &send_message_super_def);
|
||||
}
|
||||
e = new_expr ();
|
||||
e->type = ex_def;
|
||||
e->e.def = super ? send_message_super_def : send_message_def;
|
||||
e->e.def = get_def (&type_IMP, super ? "obj_msgSend_super" : "obj_msgSend",
|
||||
pr.scope, st_extern);
|
||||
return e;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue