On 07/10/2014 08:31 AM, Markus Armbruster wrote: > Luiz Capitulino <lcapitul...@redhat.com> writes: > >> The event code generator barfs when it sees a dot in an event >> argument, this makes it impossible to support vendor extensions >> in event arguments as they always contain dots. Fix this by >> replacing dots by hyphens in the generated code. > > Code replaces by underbar, not hyphen. > >> PS: Event names and QMP command arguments may suffer from the >> same issue, but I'm not checking/fixing them today. >> >> Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com> >> ---
>> +# Should be used where vendor extensions are supported >> +def c_arg(name): >> + return c_var(name).replace('.', '_') >> + >> def c_list_type(name): >> return '%sList' % name > > Can anybody think of a use of c_var() that needs '.' preserved? If the generator spits out any comments, those comments should refer to the QMP wire name, including the '.'. But right now, generated code doesn't seem to do that. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature