summaryrefslogtreecommitdiffstats
path: root/python_modules
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-12 13:24:52 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:54 +0100
commit9ef008e5c3b1b3194ecf5e4f90d7e79ca76ff3d9 (patch)
tree5f7ff4917be58c5877287bc849f97efc205e9653 /python_modules
parent5846dec251099eb11fcca2c10ab3d7d546475506 (diff)
downloadspice-common-9ef008e5c3b1b3194ecf5e4f90d7e79ca76ff3d9.tar.gz
spice-common-9ef008e5c3b1b3194ecf5e4f90d7e79ca76ff3d9.tar.xz
spice-common-9ef008e5c3b1b3194ecf5e4f90d7e79ca76ff3d9.zip
codegen: Fix enums.h generation
With the new usbredir code we have the new concept of the abstract / generic spicevmc channel type (which just tunnels data from a qemu chardev), and we've the usbredir channel, which is the only current user of this. This was reflected in the protocols enum in spice-protocol.h by a manual edit done by me, my bad. This patch teaches spice.proto about the relation between the abstract spicevmc channel and the usbredir channel and modifies codegen to deal with this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'python_modules')
-rw-r--r--python_modules/ptypes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
index f12a2f3..4585949 100644
--- a/python_modules/ptypes.py
+++ b/python_modules/ptypes.py
@@ -947,6 +947,9 @@ class ChannelType(Type):
server_messages_byname = self.base.server_messages_byname.copy()
client_messages = self.base.client_messages[:]
client_messages_byname = self.base.client_messages_byname.copy()
+
+ # Set default member_name, FooChannel -> foo
+ self.member_name = self.name[:-7].lower()
else:
server_messages = []
server_messages_byname = {}
@@ -998,7 +1001,6 @@ class ProtocolMember:
def resolve(self, protocol):
self.channel_type = self.channel_type.resolve()
- assert(self.channel_type.member_name == None)
self.channel_type.member_name = self.name
return self