cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: s/bool/int

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Wed, 26 May 2010 12:29:13 +0200

On Wed May 26 2010 12:20:36 Tor Arntsen wrote:
> Then I suggest we change it to an enum, as mentioned in the latest
> discussion between myself and Michael.

On all platform I use libcurl, it already utilizes the standard bool, so it
will not affect me directly. I only want to keep the code itself as is, at
least. As for the enum idea, I like it. I see gnulib's stdbool module is
also based on enum:

http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/stdbool.in.h

Moreover we already have some equipment for catching suspicious conversion
to/from/between enums:

http://git.kernel.org/?p=devel/sparse/sparse.enum-warning.git

Do you feel like writing a patch to replace the definition of unsigned char
by definition of enum?

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