mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Do not demand a defined def is actually global.
Rather, only that it is neither external nor local. The idea was to catch myself swapping the arguments to resolve_external_def, but for some reason I decided type encoding defs would not be global (save game reasons?).
This commit is contained in:
parent
acc188d62b
commit
3b3e013d4a
1 changed files with 9 additions and 4 deletions
|
@ -284,10 +284,10 @@ resolve_external_def (defref_t *ext, defref_t *def)
|
||||||
REF (ext)->flags);
|
REF (ext)->flags);
|
||||||
linker_internal_error ("ext is not an external def");
|
linker_internal_error ("ext is not an external def");
|
||||||
}
|
}
|
||||||
if (!(REF (def)->flags & QFOD_GLOBAL)) {
|
if (REF (def)->flags & (QFOD_EXTERNAL | QFOD_LOCAL)) {
|
||||||
def_error (REF (ext), "%s %x", WORKSTR (REF (ext)->name),
|
def_error (REF (def), "%s %x", WORKSTR (REF (def)->name),
|
||||||
REF (ext)->flags);
|
REF (def)->flags);
|
||||||
linker_internal_error ("def is not a global def");
|
linker_internal_error ("def is an external or local def");
|
||||||
}
|
}
|
||||||
if (REF (ext)->type != REF (def)->type) {
|
if (REF (ext)->type != REF (def)->type) {
|
||||||
linker_type_mismatch (REF (ext), REF (def));
|
linker_type_mismatch (REF (ext), REF (def));
|
||||||
|
@ -307,6 +307,11 @@ define_def (defref_t *ref, hashtab_t *extern_tab, hashtab_t *defined_tab)
|
||||||
defref_t *r;
|
defref_t *r;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
|
if (REF (ref)->flags & (QFOD_EXTERNAL | QFOD_LOCAL)) {
|
||||||
|
def_error (REF (ref), "%s %x", WORKSTR (REF (ref)->name),
|
||||||
|
REF (ref)->flags);
|
||||||
|
linker_internal_error ("ref is an external or local def");
|
||||||
|
}
|
||||||
name = WORKSTR (REF (ref)->name);
|
name = WORKSTR (REF (ref)->name);
|
||||||
if ((r = Hash_Find (defined_tab, name))) {
|
if ((r = Hash_Find (defined_tab, name))) {
|
||||||
if (REF (r)->flags & QFOD_SYSTEM) {
|
if (REF (r)->flags & QFOD_SYSTEM) {
|
||||||
|
|
Loading…
Reference in a new issue