Re: [libvirt] proposal: allow use of "bool": HACKING: discuss C types

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

 



On Tue, Jan 13, 2009 at 08:34:28AM +0100, Jim Meyering wrote:
> "Richard W.M. Jones" <rjones@xxxxxxxxxx> 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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]