> Jeffrey Altman wrote:
> >
> >
> > 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'm not sure what you mean by that. What we could have is one "official"
> version in the cases where it isn't apparent what is returned from
> context.
>
> For example when a pointer is returned it isn't obvious if it is
> persistent. If (for example) an int is returned or used then there is no
> ambiguity.
>
> The older versions could be retained for now but no guarantee that they
> always will be.
>
> Nothing is certain yet. I'm beginning to think the whole idea should be
> scrapped in favour of retaining the ambiguity but documenting it.
>
> I'd love to have the freedom to break existing code all over the place.
> The first thing I'd dump would be EVP probably followed closely behind
> by the ASN1 stuff.
>
> Unfortunately there is quite a large code base dependent on the current
> behaviour. Minor changes to the API can be accommodated: something that
> forces all existing code to be rewritten would be IMHO hard to justify.
>From my reading of the few posts that were not only in openssl-cvs it
sounds to me that what is being proposed is that each function which
returns a pointer and is somewhat ambiguous is being replaced by two
functions. One that maintains the current ambiguous behavior and a
new function that does whatever the current one does not.
So if we currently have
TYPE * API_blah(...)
we are now going to have
TYPE * API_blah_must_be_freed()
TYPE * API_blah_must_not_be_freed()
What it seems to me is that what should be done is
TYPE * API_blah(..., int app_will_free_object)
#ifdef OLDAPP_COMPATIBILITY
#define API_blah(....) API_blah(...., X)
#endif
where X is replaced by zero or one depending on the current behavior
for that function.
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]