cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Why does multi_curl_perform return CURLE_UNSUPPORTED_PROTOCOL

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 7 Mar 2011 15:37:29 -0800

On Mon, Mar 07, 2011 at 02:57:03PM -0800, Alan Wolfe wrote:
> Doesn't this make you wish that C/C++ could more easily enforce type
> safety between different enums??
>
> I wonder how much dev time has been lost in the world because someone
> was mistakenly comparing 2 different enums together.

I haven't seen the original code, but I'm willing to bet it was something
like:

int rc = curl_multi_perform(...);

as opposed to:

CURLMcode rc = curl_multi_perform(...);

The compiler would have warned in the latter case.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-08