cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_escape() and curl_easy_unescape() length arguments data types

From: Michal Marek <mmarek_at_suse.cz>
Date: Wed, 16 Jan 2008 12:56:51 +0100

Daniel Stenberg wrote:
> I meant that if we change to size_t at let's say the next SONAME bump,
> applications that are written to work with today's API *and* the next
> will have to adapt to the API being int OR size_t when it calls the
> function and it thus needs to use #ifdefs or similar.

They'll call the same function and the compiler will truncate / expand
the data type passed in the last argument as needed. E.g. when today
someone calls curl_easy_escape(handle, string, strlen(string)) it works
just fine (as long as strlen(string) fits into an int).

just my two cents,
Michal
Received on 2008-01-16