curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: curl_easy_setopt type checking for C++

From: Marcel Raad via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 10 Dec 2019 14:18:13 +0000

> -----Original Message-----
> From: curl-library <curl-library-bounces_at_cool.haxx.se> On Behalf Of Daniel
> Stenberg via curl-library
> Sent: Tuesday, 10 December, 2019 15:04
> To: Jeff Mears via curl-library <curl-library_at_cool.haxx.se>
> Cc: Daniel Stenberg <daniel_at_haxx.se>
> Subject: Re: curl_easy_setopt type checking for C++
>
> If there's a downside with automatically converting ints to longs in those two
> functions, it is that it will create more code out there for people to copy and
> paste from that will generate errors and pain if that C++ version would look
> exactly the same as the C version but in that imaginary C++ version we can
> pass in an int and it will be fine we cannot in the C version...
>
> So, I lean towards erroring on wrong type.

+1 for consistency.

Marcel

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-12-10