On 04/29/2015 05:29 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> Now that c_var() handles '.' in downstream extension names, fix >> the generator to support such names as additional types, enums, >> members within an enum, branches of a union or alternate, and >> in arrays. >>
>> -def generate_visit_list(name, members): >> +def generate_visit_list(name, members, builtin=False): >> + if not builtin: >> + name = c_var(name) > > Fun. > > c_var() does two things: > > (a) it protects certain words if protect=True > > (b) it maps funny characters to '_'. > > When builtin, (a) is unwanted, and (b) does nothing. That's why we need > the conditional. > > A possible alternative could be c_var(name, not builtin). Matter of > taste. > > Hmm, just saw what type_name() does. Why not just > > name = type_name(name) > > ? Oops, I think I missed this comment in my v3 posting, amidst all my patch splitting. > > If it was my patch, I'd be tempted to split it up some. Matter of > taste, feel free to keep it a single patch. v3 splits it up. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature