> The problem here is what is right? 
> 
> Its not that clear cut.
> 
> If we decide that all the get/set/add functions should up reference
> counts then you have to add reference counts to all manner of things or
> Malloc() copies.
> 
> Any code that relies on the old behaviour will end up leaking memory all
> over the place.

> Alternatively if we decide that nothing should up reference counts then
> anything which assumes that the structure is persistent will crash when
> one of them gets freed.
> 
> Doing either will break lots of existing code need major rewrites and
> probably get several of us lynched :-)
> 
> So the alternative is to have a naming convention and just say the old
> functions are retained for backwards compatibility. Any future
> documentation might not even document the old functions to encourage the
> use of the new versions.

So in other words you plan to implement two versions of every single 
function?  And then leave it up to the caller to determine what the
behavior should be?  This is going to be a nightmare.

I would rather you just break the code outright.  Forget the separate
names.  If you need to provide a method for determining whether or not
the returned value should be considered persistent then add a
parameter to the function specification which will determine the
behavior.

This will cause all existing source code to break.  And that is a good
thing because more than like most current applications are leaking
memory all over the place or a crashing under certain circumstances
that appear random and can rarely be replicated.

Breaking the interfaces will force the developers to examine their
code to see how they are managing the memory to ensure they are doing
it properly.  The way things are now every time there has been a new
OpenSSL (or SSLeay) release I have had to spend three or four days
going over the code to make sure things still work anyway.  I don't
see this requirement going away with the 0.9.5 release because of the
desire to clutter the API with the intention of preserving backwards
compatibility.  

If you want to preserve backwards compatibility with my recommendation
then you can do it via the use of an #ifdef section in the header
which will map the old parameter lists to the new ones.  But by
default this functionality should be disabled.



    Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
                 The Kermit Project * Columbia University
              612 West 115th St #716 * New York, NY * 10025
  http://www.kermit-project.org/k95.html * [EMAIL PROTECTED]


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

Reply via email to