On 07/05/2014 12:00 PM, Ben Laurie wrote:
I've been experimenting with more type correctness and less casting.

Some of the big casting culprits are the various _ctrl() functions,
e.g. SSL_ctrl().

Does anyone have any clue why these exist?
I think the model is to have only one function to modify the
content of these objects.

API stability and small footfrint is obviously one goal.

A similar technique is used in curl in the easy_setopt function.
The implementation there distinguished some "classes" of
parameter types.


Is there any reason to not replace them with direct function calls
(other than API stability)?
You can have a compiled newer application running against
an older .so and get a run time error 'library too old or so"
so the application can shutdown "nicely". (at least in theory).

Some years ago the access macros had been replaced by
lots of functions, that could have been done using the _ctrl interface
but was done by adding lots of functions.

I think the that bad pointer type problems have been somewhat
underestimated, similar to not having enums instead of #define
for various parameters.

Peter



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

Reply via email to