cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: s/bool/int

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 26 May 2010 22:53:21 +0200 (CEST)

On Wed, 26 May 2010, Tor Arntsen wrote:

>> Yes I think so. The variables we declare as 'bool' MUST NEVER be anything
>> else than TRUE or FALSE.
>
> Hm, this mail didn't show up in my mailer until about just now..

Yes, I noticed. I'm sorry for that, but I blame some setup problems due to the
server relocation we did the other day - not that I can explain why that would
have this effect... For some unexplainable reason, I've also ended up in the
worst spam storm I've ever experienced (I'm now well over 20000 spams/day to
me alone) so I've struggled a bit my mail situation. I think I'm back on track
now.

> Anyway, the bool->enum change (for non-C99 platforms) that I posted should
> take care of that aspect quite well (MIPSPro compiler will detect it). It
> changed the #defines of TRUE and FALSE from 1/0 to true/false (which would
> be either from the enum in the non-C99 case, or the C99 types otherwise) so
> it should help for C99 too, if Kamil's cgcc-tricks work out.

Yes, I like where you're going with that work. A lot. Getting help from the
compiler to warn on mistakes and abuse is GREAT.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-26