Allocate a stack with comparison function c and room for n elements.

Synopsis

Declared in <openssl/stack.h>

OPENSSL_STACK*
OPENSSL_sk_new_reserve(
    OPENSSL_sk_compfunc c,
    int n);

Return Value

New stack, or NULL on failure; free with OPENSSL_sk_free().

Parameters

Name

Description

c

Comparison callback, or NULL for an unordered stack.

n

Number of element slots to reserve up front.

Created with MrDocs