mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
Use the class name in type encodings.
After all that effort getting the class def initialized early enough for type encodings to work, it proved to be a problem: just including a header with an interface in it would cause linker errors if there was no implementation available (even if the class is never used).
This commit is contained in:
parent
101ca22b5a
commit
f3e2e239b8
2 changed files with 4 additions and 3 deletions
|
@ -248,7 +248,7 @@ qfo_encode_class (type_t *type)
|
|||
|
||||
def = qfo_new_encoding (type, sizeof (enc->t.class));
|
||||
enc = D_POINTER (qfot_type_t, def);
|
||||
ENC_DEF (enc->t.class, type->t.class->def);
|
||||
ENC_STR (enc->t.class, type->t.class->name);
|
||||
return def;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef struct qfot_type_s {
|
|||
qfot_func_t func;
|
||||
qfot_struct_t strct;
|
||||
qfot_array_t array;
|
||||
Class class;
|
||||
string class;
|
||||
} t;
|
||||
} qfot_type_t;
|
||||
|
||||
|
@ -166,7 +166,8 @@ test_types (void)
|
|||
type.t.array.base, type.t.array.size);
|
||||
break;
|
||||
case ty_class:
|
||||
printf (" %p %s\n", type.t.class, type.t.class.name);
|
||||
printf (" %s %p\n", type.t.class,
|
||||
obj_lookup_class (type.t.class));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue