appro> Well, it's actually 3 and 5 which are the same. I.e. in the

Ah, right, I made the comparison from a language semantics point of
view...

appro> > It's a good way to deal with the problem in what could be perceived as
appro> > a safe way, but for a detail: there's no way to see from the API that
appro> > function pointers need to be handled differently than other pointers
appro> > when passed down to the functino using them ("doall" and "ctrl"
appro> > functions...), and the compiler will not give a hint.

appro> Well, you probably don't have to tell the difference at the
appro> *published* "API" level (API is in quotes as there's a lot of
appro> macros).

Uhmm...  Why not?

appro> Why assign? parg.fn() (#4) and parg->fn() (#5) suffice and are perfectly
appro> readable/debuggable, aren't they?

Yes.  Consider the above an example, nothing else.  The real thing
would probably be to assign a callback variable...

appro> > I dunno about you, but I really don't like choice 3.  At all.  My gut
appro> > feeling is that it's way error prone, and may be quite hard to debug.
appro> > As I see it, the only real way to make it type safe, ANSI compliant
appro> > and avoid error proneness is to stick with choices 4 or 5.

appro> My vote is #5 for crypto/mem_dbg.c, crypto/bio/bss_conn.c,
appro> ssl/s3_lib.c with new calls and separate ctl codes for binary
appro> compatibility (I can fix up bss_conn.c and s3_lib.c to *show*
appro> what I mean). I'll be back about o_names.c...

Why have it different for o_names.c?

appro> > And yes, there will be the problem of binary compatibility in all
appro> > choices but 1 and 2...

appro> *and* #4 on the supported platforms. I mean on all *currently*
appro> supported platforms sizeof(void(*)()) == sizeof(void *) and
appro> pass of union (by value) is *equivalent* to pass of pointer (by
appro> value).

Quite right.

Sounds like the ultimate way of choice would be #4...

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-161 43  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis             -- [EMAIL PROTECTED]

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to