[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] proposal: allow use of "bool": HACKING: discuss C types
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Jim Meyering <jim meyering net>
- Cc: Libvirt <libvir-list redhat com>
- Subject: Re: [libvirt] proposal: allow use of "bool": HACKING: discuss C types
- Date: Tue, 13 Jan 2009 09:32:47 +0000
On Tue, Jan 13, 2009 at 08:34:28AM +0100, Jim Meyering wrote:
> "Richard W.M. Jones" <rjones redhat com> wrote:
> > On Wed, Dec 17, 2008 at 09:08:36PM +0000, Daniel P. Berrange wrote:
> >> Ok, if you want to re-post the HACKING file also mentioning that
> >> 'bool' shouldn't be used in our public APIs & wire protocol,
> >
> > What's wrong with using it in the wire protocol? XDR provides bool_t
> > (as int) and converts 'bool' in the interface definition to bool_t.
>
> It's good to know that from portability/correctness standpoints that
> would work. However, using a 32-bit "int" to transmit a single bit
> of info is wasteful. How about this clarification to HACKING?
There's no need. The types on the wire are a direct serialization of
the types in our public API methods & structs. Since we forbid the use
of bool in the public API, we'll never have any need for it on the
RPC wire API.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]