cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_setopt and typeof

From: Dan Fandrich <dan_at_coneharvesters.com>
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
expected.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-04-13