mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Ensure a field def is emitted for @this.
This commit is contained in:
parent
7f67e6eb17
commit
92ba110a87
1 changed files with 6 additions and 6 deletions
|
@ -1091,17 +1091,17 @@ check_defs (void)
|
|||
linker_add_def (".self", &type_entity, QFOD_GLOBAL, 0);
|
||||
did_self = 1;
|
||||
} else if (strcmp (name, ".this") == 0 && !did_this) {
|
||||
pointer_t offset;
|
||||
type_t *type;
|
||||
int flags;
|
||||
defref_t *this_ref;
|
||||
|
||||
if (!class_Class.super_class)
|
||||
class_init ();
|
||||
type = field_type (&type_ClassPtr);
|
||||
offset = defspace_alloc_loc (work_entity_data, 1);
|
||||
flags = (QFOD_GLOBAL | QFOD_CONSTANT
|
||||
| QFOD_INITIALIZED | QFOD_NOSAVE);
|
||||
linker_add_def (".this", type, flags, offset);
|
||||
flags = QFOD_GLOBAL | QFOD_NOSAVE;
|
||||
this_ref = make_def (qfo_entity_space, name, &type_id, flags, 0);
|
||||
flags |= QFOD_CONSTANT | QFOD_INITIALIZED;
|
||||
type = field_type (&type_id);
|
||||
linker_add_def (".this", type, flags, REF (this_ref)->offset);
|
||||
did_this = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue