On Tue, Jul 20, 1999 at 10:55:20AM +0100, Ben Laurie wrote:
> Bodo Moeller:

>>>> So, is backwards compatibility an important issue here
>>>> and is it worth this kind of evil hack, or should we
>>>> just add the parameters?

>>> Backward compatibility is an important issue.  Think "dynamic
>>> library".

>> The funny thing here is that if we just add the parameters, then on
>> systems with "standard" calling convention old programs should run
>> without any problems with newly compiled shared libraries: The new
>> library functions will expect one parameter that is not actually there
>> and will take whatever happens to be on the stack and pass it to the
>> callback function as a "pointer argument"; the callback function in
>> turn just ignores this extra (garbage) argument.

> Although you are likely to get away with this, it isn't strictly legal.

I know that.  But how much effort would you think achieving real
(guaranteed) compatability is worth?  Should the functions that call
those callbacks have an "if" so that old-style callbacks are called
with a different function call than new callbacks with the extra
argument?  Or can't we just decide that future releases of the library
should have a clean interface always with the void * argument and
without such complications for backwards compatability?  It violates
the abstraction provided by the C language, that's for sure; but
binary compatibility is really just important for those platforms on
which binaries do actually exist, and the dirty function calls should
soon be a thing of the past.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to