cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patch to get ip address last requested

From: Jamie Lokier <jamie_at_shareable.org>
Date: Wed, 20 Jul 2005 17:49:19 +0100

Gisle Vanem wrote:
> >+ if ( !cachedIp ) return CURLE_FAILED_INIT;
> >+
> >+ struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
> >+ struct SessionHandle *easy=(struct SessionHandle *)easy_handle;
>
> It may be a good feature you've contribuited. But don't use
> C++ features like this. Only gcc supports this AFAIK. Define
> variables at top of scope.

Actually this feature has been standard in C since 2000 (the "C99"
ANSI/ISO standard), and is supported by all modern C compilers.

But you're right to object because of course it's not portable to
older C compilers.

-- Jamie
Received on 2005-07-20