aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/openssl/safestack.h4
-rw-r--r--include/openssl/stack.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/openssl/safestack.h b/include/openssl/safestack.h
index 4241c4ff3b..7438b19360 100644
--- a/include/openssl/safestack.h
+++ b/include/openssl/safestack.h
@@ -40,6 +40,10 @@ extern "C" {
{ \
return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
} \
+ static ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
+ { \
+ return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
+ } \
static ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
{ \
return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
diff --git a/include/openssl/stack.h b/include/openssl/stack.h
index aee763c196..cfc075057a 100644
--- a/include/openssl/stack.h
+++ b/include/openssl/stack.h
@@ -27,6 +27,7 @@ void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data);
OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp);
OPENSSL_STACK *OPENSSL_sk_new_null(void);
+OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n);
int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n);
void OPENSSL_sk_free(OPENSSL_STACK *);
void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *));