On 19/01/16 14:21, Ian Campbell wrote:
> On Tue, 2016-01-19 at 14:06 +0000, Ian Jackson wrote:
>> I am not a fan of the cast as a solution.  I would rather, prefer to
>> regularise the situation.  If my co-maintainers agree about the
>> desirability of expecting libxl callers to use enum values from Xen
>> public headers,
<snip>
> I think part of the problem is that it is hard to expose just the desired
> bits through to the user of libxl without also exposing the full xen
> hypercall interface (the vast majority of which would be inappropriate to
> expose to them since libxl is suppose to encapsulate such things).

I agree with this sentiment...

> As a possible alternative, we could make it such that the IDL generator
> knows about the linkage and enforces the use of the same values, and
> automatically provides conversion helpers (essential a cast wrapped in some
> syntax) for _internal_ use.

...and using the IDL to enforce or generate values was my first thought.

 -George

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

Reply via email to