Rich Salz wrote:
>
> > I've forgotten what method 3 is.
>
> #ifdef DO_IT_THISWAY
> #define CCONST const
> #else
> #define CCONST /* */
> #endif
>
> int BN_mul(BIGNUM *r, CCONST BIGNUM *a_, CCONST BIGNUM *b, BN_CTX *ctx)
> {
> BIGNUM* a = (BIGNUM*)a_;
>
> ... proceed as currently used.
>
> folks who are concerned that their compiler might put a struct that
> someone has somehow managed to create at compile-time can #undef
> DO_IT_THISWAY
That's not the issue - the issue is that if you declare something const
the compiler can assume it doesn't change over the function call. If it
does, then things can break.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"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]