On 09/13/2013 05:34 PM, Jonathon Jongsma wrote:
Opinions on this? The end goal is to be able to generate a header that has both the enums and descriptions of those enum values (e.g. a mapping from enum to string name) that we can use for the wireshark dissector. Obviously, when a new channel or new message gets added to the protocol, there is still some manual work that needs to be done to update the wireshark dissector, but being able to autogenerate theses values reduces the maintenance burden for this part at least.
Hi Jonathon,
1. Nice !
2. Unfortunately, you upcase the enum names, but
in spice-protocol/spice/enums.h there are some enums that are not all
upper-case.
For example SPICE_VSC_MESSAGE_TYPE_Init.
This breaks the (spice-common) build.
Thanks,
Uri.
---
python_modules/codegen.py | 2 +-
python_modules/ptypes.py | 17 ++++++++
spice_codegen.py | 105 ++++++++++++++++++++++++++++++----------------
3 files changed, 87 insertions(+), 37 deletions(-)
diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 009cf95..5dee0b8 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -41,7 +41,7 @@ def set_prefix(prefix):
def prefix_underscore_upper(*args):
s = proto_prefix_upper
for arg in args:
- s = s + "_" + arg
+ s = s + "_" + arg.upper()
return s
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel