diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-05-21 16:31:09 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-05-21 22:49:00 +0100 |
commit | 4591e5fb4168eb81d198a236d265d87256bf67c1 (patch) | |
tree | 4b270d1c017918aa0944bdaaa111140709ebe3de /include/openssl | |
parent | 8bf780432c11bcedf20161f5e76bc19e300af419 (diff) | |
download | openssl-4591e5fb4168eb81d198a236d265d87256bf67c1.tar.gz |
Constify stack and lhash macros.
RT#4471
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/lhash.h | 6 | ||||
-rw-r--r-- | include/openssl/safestack.h | 7 | ||||
-rw-r--r-- | include/openssl/stack.h | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/include/openssl/lhash.h b/include/openssl/lhash.h index 7c568ac057..e2ccb65d69 100644 --- a/include/openssl/lhash.h +++ b/include/openssl/lhash.h @@ -153,15 +153,15 @@ void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out); } \ static ossl_inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ - OPENSSL_LH_node_stats_bio((OPENSSL_LHASH *)lh, out); \ + OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ - OPENSSL_LH_node_usage_stats_bio((OPENSSL_LHASH *)lh, out); \ + OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ - OPENSSL_LH_stats_bio((OPENSSL_LHASH *)lh, out); \ + OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \ { \ diff --git a/include/openssl/safestack.h b/include/openssl/safestack.h index d0af0eba5d..306b3acc57 100644 --- a/include/openssl/safestack.h +++ b/include/openssl/safestack.h @@ -54,7 +54,8 @@ extern "C" { } \ static ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \ { \ - return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (void *)ptr); \ + return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \ + (const void *)ptr); \ } \ static ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \ { \ @@ -86,11 +87,11 @@ extern "C" { } \ static ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \ { \ - return OPENSSL_sk_find((OPENSSL_STACK *)sk, (void *)ptr); \ + return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \ { \ - return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (void *)ptr); \ + return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \ { \ diff --git a/include/openssl/stack.h b/include/openssl/stack.h index 6fab33b759..9bc550fe08 100644 --- a/include/openssl/stack.h +++ b/include/openssl/stack.h @@ -32,9 +32,9 @@ void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *)); OPENSSL_STACK *OPENSSL_sk_deep_copy(OPENSSL_STACK *, OPENSSL_sk_copyfunc c, OPENSSL_sk_freefunc f); int OPENSSL_sk_insert(OPENSSL_STACK *sk, void *data, int where); void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc); -void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, void *p); -int OPENSSL_sk_find(OPENSSL_STACK *st, void *data); -int OPENSSL_sk_find_ex(OPENSSL_STACK *st, void *data); +void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p); +int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); +int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); int OPENSSL_sk_push(OPENSSL_STACK *st, void *data); int OPENSSL_sk_unshift(OPENSSL_STACK *st, void *data); void *OPENSSL_sk_shift(OPENSSL_STACK *st); |