Nicolas, I would read void (*CRYPTO_get_locking_callback)(int mode,int type,const char *file,int line) as a pointer to a function taking four arguments and returning nothing. That is _not_ what OpenSSL defines. With the added void argument, it looks to me like the callback takes no arguments and returns nothing. I would expect what you described to look more like (void* (*CRYPTO_get_locking_callback)(int mode,int type,const char *file,int line)) F(void); I prefer to "hide" function pointers using type definitions to make them clear. You mention a function named F, but the given syntax does not name it. It does look like any prototype I have seen, and it's not a typedef, unless that is happening implicitly?? Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Nicolas Cellier Sent: Tuesday, March 10, 2009 5:14 PM To: pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] OpenSSL - a couple of questions Schwab,Wilhelm K <bschwab@...> writes:
Nicolas,
Fair enough, but it's the rest of the expression that bothers me - what does
the second argument sequence do?
Bill
I'm not sure I understand the question, but i'll tell how I read this syntax: CRYPTO_get_locking_callback is a function taking four arguments (int mode,int type,const char *file,int line). CRYPTO_get_locking_callback will return a pointer to a function, say F. This function F does take no argument and return no result. void F(void). Nicolas
-----Original Message----- From: pharo-project-bounces@... [mailto:pharo-project-bounces@...] On Behalf Of Nicolas Cellier Sent: Tuesday, March 10, 2009 3:23 PM To: pharo-project@... Subject: Re: [Pharo-project] OpenSSL - a couple of questions
Schwab,Wilhelm K <bschwab@...> writes:
gmane want me to snip... _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project