Nicolas,

I think I am starting to get it.  It is a prototype for 
CRYPTO_get_locking_callback() ??

It appears that

   ( *funcName(args) )

signifies that funcName() returns a pointer to the function type "wrapped 
around" it?  In this case void NoName(int mode, int type, const char* file, int 
line).

I think I just found this described on pg 169-170 of my copy of Lippman's C++ 
Primer.  Why people do not consistently use typedefs for this type of thing is 
beyond me ~:(

Thanks!

Bill





>    void (*CRYPTO_get_locking_callback(void))(int mode,int type,const 
> char *file,int line);

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Nicolas 
Cellier
Sent: Tuesday, March 10, 2009 7:23 PM
To: [email protected]
Subject: Re: [Pharo-project] OpenSSL - a couple of questions


So here is a better explanation.

0) CRYPTO_get_locking_callback is the name of the function.
It is not a typedef.
1) CRYPTO_get_locking_callback is a function taking no argument (void)
2) it returns a pointer to a function which
2.a) return nothing (void)
2.b) takes four arguments int mode,int type,const char *file,int line))

I can read C, but const and function pointer are ones I will fail to parse 50%
of time... Feel like I must not be alone...

This is C anyway... It's not that easy to speak to a dumb compiler, so that he
finally understands how to optimize that code! And not to optimize that code is
of course not an option...

Nicolas


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to