diff options
author | Alon Levy <alevy@redhat.com> | 2012-06-14 11:43:20 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-06-14 13:53:46 +0300 |
commit | 341f33cbdb77ee8fd804dca0f66b8ddb3bc3602c (patch) | |
tree | 30154180b27eb6d0dde402cf3431d06e4bae2161 /python_modules/ptypes.py | |
parent | 543faaf796c07e7948830b42def13b3854e958a8 (diff) | |
download | spice-protocol-341f33cbdb77ee8fd804dca0f66b8ddb3bc3602c.tar.gz spice-protocol-341f33cbdb77ee8fd804dca0f66b8ddb3bc3602c.tar.xz spice-protocol-341f33cbdb77ee8fd804dca0f66b8ddb3bc3602c.zip |
python_modules/ptypes.py/EnumBaseType.c_enumname: add missing return to fix broken enums generation
Fixes the resulting enums.h from the invocation of:
./spice_codegen.py --generate-enums spice.proto spice-protocol/spice/enums.h
Right now any enum will contain None as the enum members, with this fix
it will contain the real enum members, i.e. SPICE_FOO.
Diffstat (limited to 'python_modules/ptypes.py')
-rw-r--r-- | python_modules/ptypes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index 132ba99..d9fbfe2 100644 --- a/python_modules/ptypes.py +++ b/python_modules/ptypes.py @@ -234,7 +234,7 @@ class EnumBaseType(Type): return codegen.prefix_camel(self.name) def c_enumname(self, value): - self.c_enumname_by_name(self.names[value]) + return self.c_enumname_by_name(self.names[value]) def c_enumname_by_name(self, name): if self.has_attr("prefix"): |