cURL / Mailing Lists / curl-library / Single Mail


Re: curl_easy_setopt and typeof

From: Dan Fandrich <>
Date: Sun, 13 Apr 2008 09:14:16 -0700

On Sun, Apr 13, 2008 at 11:29:58AM -0400, Nathan E. Moore wrote:
> It is irrelevant what the docs say it is perfectly legal to pass a smaller
> type to a varargs function expecting a larger one. It will just work, just
> like it would for a normal function. There is no reason the type checker
> should be more restrictive than c. It should allow anything that can be
> promoted to long (char, short, int long, bitfields, enums).

curl_easy_setopt is a varargs function, so there won't be any automatic
promotion. You have to cast the value yourself if it's not exactly what's

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-04-13