[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.



At 19:49 +0200 on 26 Feb (1424976562), Razvan Cojocaru wrote:
> On 02/26/2015 07:01 PM, Tim Deegan wrote:
> > +#ifdef __cplusplus
> > +/* 'private' is a keyword in C++, so we have to use a different name for
> > + * private state there.  Leaving the C name alone to avoid unnecessary
> > + * pain for the existing users. */
> > +#define XEN_RING_PRIVATE pvt
> > +#else
> > +#define XEN_RING_PRIVATE private
> > +#endif
> 
> Are there likely to be many users outside of the ones using that code
> with mem_event?

Yes, lots.  It's used to implement split drivers for net, block, etc.
Most users will have taken copies of this header into their own trees,
though, and so won't face build breakage, and this isn't an ABI change.

So far, I've seen David and Andrew in favour of just changing the
field's name and letting out-of-tree users update their copies when/if
they want to.  Jan would prefer to avoid changing the field name for C
users.  I'm not delighted with any of these options but I think this
ifdeffery is worse than the others. :)

Let's see what anyone else has to say.

Cheers,

Tim.

_______________________________________________
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®.