[systemd-devel] [RFC] Initial work for asyncns push

Lennart Poettering lennart at poettering.net
Tue Dec 10 17:22:38 PST 2013


On Wed, 11.12.13 02:18, Lennart Poettering (lennart at poettering.net) wrote:

> > C99 or C89? Do we want it to be public or private? 
> 
> Internally we use C99 and a lot of gcc extensions.
> 
> Externally we limit ourselves to C89. 
> 
> One effect of this is that internally we use the C99 bool type for
> booleans, but externally we use "int" when things show up in public
> APIs.

And to extend on this: this actually has weird effects. C99 bool will
actually downgrade to "int" automatically when passed to functions as
arguments (and vice versa). However gcc uses a different size in memory
for this, which means that for doing call-by-value you can rely on this
automatic conversion but if you do call-by-reference, then things will
go boom in major ways.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list