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

Re: [Libvir] [PATCH] add scheduler API(take 3?)



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.

Rich.

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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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