cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: SSL_CTX_callback_ctrl callback changed

From: Jamie Lokier <jamie_at_shareable.org>
Date: Sun, 13 Nov 2005 17:15:15 +0000

Daniel Stenberg wrote:
> >openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
> >void (*)());
> >
> >openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
> >void (*)(void));
>
> (I assume you meant the second one to be 0.9.8)
>
> They look identical.

They're different. The first means "pointer compatible with any
function returning void, whatever arguments it takes". The second
means "pointer to function returning void and taking no arguments.".

If you pass the address of a function like `void foo (int)' to the
first one, that's fine and there are no warnings.

If you pass the same address to the second one, it will give a warning
like `warning: passing arg 3 of `SSL_CTX_callback_ctrl' from
incompatible pointer type. There is probably a good
reason for the warning - like is the function called with no arguments?

-- Jamie
Received on 2005-11-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET