[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] RFC: Automatically check xen's public headers for C++ pitfalls.



>>> On 26.02.15 at 18:01, <tim@xxxxxxx> wrote:
> At 16:47 +0000 on 26 Feb (1424965651), Jan Beulich wrote:
>> >>> On 26.02.15 at 17:28, <tim@xxxxxxx> wrote:
>> > At 16:11 +0000 on 26 Feb (1424963496), Tim Deegan wrote:
>> >> Explicitly _not_ addressing the use of 'private' in various fields,
>> >> since we'd previously decided not to fix that.
>> > 
>> > BTW, ring.h is the only instance of that, so the extra diff to clear
>> > that up too is pretty small (see below).
>> > 
>> > Not sure what people think about that though - it might be
>> > quite a PITA for downstream users of it, though they ought really to
>> > be using local copies so they can update in a controlled way.
>> 
>> linux-2.6.18-xen.hg always having consumed them (almost)
>> verbatim, I don't think we should break users not massaging
>> the headers. I.e. at least make the field name conditional upon
>> using C vs C++.
> 
> Something like this?  This is the kind of uglification that I would
> like to avoid, though (and I don't like '#define private pvt' much
> either).

Yes, and perhaps the definition part put into xen-compat.h
instead of io/ring.h (e.g. as XEN_PRIVATE, or - leaving room in
case C++ grows more keywords - a more generic XEN_CXX()).
I don't view this as all that ugly.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.