[Libvir] [PATCH] add scheduler API(take 3?)
Richard W.M. Jones
rjones at redhat.com
Mon Jun 4 10:01:48 UTC 2007
Daniel Veillard wrote:
> On Wed, May 30, 2007 at 04:40:39PM +0100, Richard W.M. Jones wrote:
>> * Changed the type of that field to the more logical
>> virSchedParameterType type.
> Actually there is one thing I would revert from your patch it's the
> change from int to virSchedParameterType in structs and parameters.
> Basically the problem comes from the fact that C does not define the
> size of an enum, so some compiler may use 8 bits to encode it, others
> may use 32bits, or worse say you add a new error value -1 it could
> change from 8 to 32 bits breaking ABI compatibility.
> I really prefer to use int for the virSchedParameterType in public
> structs and public functions parameters for this reason, it's far
> from ideal, but I prefer this than having weird ABI incompatibilities
> due to compiler variations :-)
Fair enough ... I didn't know that about enums actually.
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
More information about the libvir-list