diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 00:29:09 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 00:29:09 +0000 |
commit | c465e7941ec785f2ce53638b351a21d6a49fe1a0 (patch) | |
tree | b55fe5ccc4a521d1d117239f944b1325840e3fb8 /crypto/bn/bn_lib.c | |
parent | 933398f1102ba99d64f901987c5e8fe340a2c331 (diff) |
This is the least unacceptable way I've found for declaring the bignum data
and structures as constant without having to cast away const at any point.
There is still plenty of other code that makes gcc's "-Wcast-qual" unhappy,
but crypto/bn/ is now ok. Purists are welcome to suggest alternatives.
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r-- | crypto/bn/bn_lib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 783881d3a6..f63232b9fb 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -874,3 +874,11 @@ int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, } return bn_cmp_words(a,b,cl); } + +/* See the comments surrounding BIGNUM_C in bn.h */ +#ifdef BN_DEBUG +const BIGNUM *BIGNUM_CONST(const BIGNUM_C *bn) + { + return (const BIGNUM *)bn; + } +#endif |