Bodo Moeller wrote: > On Mon, Jun 17, 2002 at 07:02:45PM +0100, Ben Laurie wrote: > >>Avery Pennarun via RT wrote: >> >>>On Mon, Jun 17, 2002 at 11:19:31AM +0200, Bodo Moeller wrote: >> > >>>>Good question, but this problem does not appear to apply to C, and >>>>anyway it only makes *existing* code uglier -- for new code, the >>>>modified API makes more sense (the encoded data can be in >>>>'const unsigned char' arrays all the time). If you don't want #ifdefs >>>>and casts throughout your code, please consider hiding this in wrapper >>>>functions. >>> > >>>Hmm, okay, I'm not really convinced, but now that I see it doesn't cause C >>>programs to not compile, I think it's okay to accept the small number of >>>openssl-using C++ programs that will need changes because of this. >> > >>Hmm, well, I'm not, because all right-thinking projects have a >>zero-warnings policy. OpenSSL included. > > > The old API is not perfect when the data is located in a 'const' > array, the new API is not perfect when the data is located in a > non-'const' array. C++ code can be written to match either the old or > the new API; with the wrong API, you can have either zero warnings or > zero casts, not both. As those functions are not really supposed to > modify the data, the 'const' variant appears to be the right one.
Fair enough. Cheers, Ben. -- http://www.apache-ssl.org/ben.html http://www.thebunker.net/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]