[Vortex] async connect issue on linux 2.4
Francis Brosnan Blazquez
francis at aspl.es
Mon Oct 20 18:18:59 CEST 2008
Hi Robert,
> Hi, while you are at it, here is one point often not taken into
> account, even it's a rare one but if it happens extremly hard to track
> down. It's not ensured that you get: 0 = false and 1 = true in C/C++.
> The standard defines TRUE as != 0 So it could even be 255 (setting all
> bits for example). This is compiler implementation dependent.
>
> If porting Vortex to more platforms is on the roadmap or other people
> doing it. They might be hit by code that requires TURE = 1.
Thanks for pointing Robert.
What we are going to do is to remove all references to the bool type,
replaced by int (which is at the end the type used by C users).
Then, for axl and vortex, we define the API convention that false is 0
and true is 1. This will move us from having troubles in other platforms
since the code will check/expect to receive those values.
This will make c++ users to use 1 and 0 values to manipulate boolean API
(as they are doing at this point), avoiding to give the impression that
the c++ bool type can be used directly.
If someone else have some comment or suggestion, it would be really
appreciated.
Cheers!
--
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
More information about the Vortex
mailing list