Fix build error due to member "SpiceMsgEmpty" same name as type

This commit is contained in:
Alexander Larsson 2010-06-28 12:45:07 +02:00
parent 897e5633c2
commit b08b80d13f
2 changed files with 4 additions and 2 deletions

View File

@ -24,8 +24,8 @@
#include <messages.h>
typedef struct {
void (*SpiceMsgEmpty)(SpiceMarshaller *m, SpiceMsgEmpty *msg);
void (*SpiceMsgData)(SpiceMarshaller *m, SpiceMsgData *msg);
void (*msg_SpiceMsgEmpty)(SpiceMarshaller *m, SpiceMsgEmpty *msg);
void (*msg_SpiceMsgData)(SpiceMarshaller *m, SpiceMsgData *msg);
void (*msgc_ack_sync)(SpiceMarshaller *m, SpiceMsgcAckSync *msg);
void (*msgc_pong)(SpiceMarshaller *m, SpiceMsgPing *msg);
void (*msgc_disconnecting)(SpiceMarshaller *m, SpiceMsgDisconnect *msg);

View File

@ -369,6 +369,8 @@ def write_protocol_marshaller(writer, proto, is_server, private_marshallers):
writer.writeln("static SpiceMessageMarshallers marshallers = {NULL};").newline()
for f in sorted(functions.keys()):
member = f[len("spice_marshall_"):]
if not member.startswith("msg"):
member = "msg_" + member
writer.assign("marshallers.%s" % member, f)
writer.newline()