mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[qfcc] Emit only one instance per protocol per module
This is actually a double issue: when a class implementing a protocol used the protocol in @protocol(), not only would the protocol get emitted as part of the class data specifying that the class conforms to the protocol, a second instance would be emitted again when @protocol() was used. On top of that, only the instance referenced by @protocol() would be initialized. Now, both class emission and @protocol() get their protocol def from the same place and thus only one, properly initialized, protocol instance is emitted.
This commit is contained in:
parent
8021613b79
commit
9ccff74fcf
1 changed files with 1 additions and 1 deletions
|
@ -1667,7 +1667,7 @@ emit_protocol_list_item (def_t *def, void *data, int index)
|
|||
internal_error (0, "%s: out of bounds index: %d %d",
|
||||
__FUNCTION__, index, protocols->count);
|
||||
}
|
||||
EMIT_DEF (def->space, D_INT(def), emit_protocol (protocol));
|
||||
EMIT_DEF (def->space, D_INT(def), protocol_def (protocol));
|
||||
}
|
||||
|
||||
def_t *
|
||||
|
|
Loading…
Reference in a new issue