summaryrefslogtreecommitdiff
path: root/include/openssl/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/openssl/stack.h')
-rw-r--r--include/openssl/stack.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/include/openssl/stack.h b/include/openssl/stack.h
index 8f5b21b95f..eb98b8af9e 100644
--- a/include/openssl/stack.h
+++ b/include/openssl/stack.h
@@ -57,34 +57,33 @@
*/
#ifndef HEADER_STACK_H
-#define HEADER_STACK_H
+# define HEADER_STACK_H
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct stack_st
- {
- int num;
- char **data;
- int sorted;
+typedef struct stack_st {
+ int num;
+ char **data;
+ int sorted;
+ int num_alloc;
+ int (*comp) (const void *, const void *);
+} _STACK; /* Use STACK_OF(...) instead */
- int num_alloc;
- int (*comp)(const void *, const void *);
- } _STACK; /* Use STACK_OF(...) instead */
-
-#define M_sk_num(sk) ((sk) ? (sk)->num:-1)
-#define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL)
+# define M_sk_num(sk) ((sk) ? (sk)->num:-1)
+# define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL)
int sk_num(const _STACK *);
void *sk_value(const _STACK *, int);
void *sk_set(_STACK *, int, void *);
-_STACK *sk_new(int (*cmp)(const void *, const void *));
+_STACK *sk_new(int (*cmp) (const void *, const void *));
_STACK *sk_new_null(void);
void sk_free(_STACK *);
-void sk_pop_free(_STACK *st, void (*func)(void *));
+void sk_pop_free(_STACK *st, void (*func) (void *));
+_STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
int sk_insert(_STACK *sk, void *data, int where);
void *sk_delete(_STACK *st, int loc);
void *sk_delete_ptr(_STACK *st, void *p);
@@ -95,8 +94,8 @@ int sk_unshift(_STACK *st, void *data);
void *sk_shift(_STACK *st);
void *sk_pop(_STACK *st);
void sk_zero(_STACK *st);
-int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))
- (const void *, const void *);
+int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
+ (const void *, const void *);
_STACK *sk_dup(_STACK *st);
void sk_sort(_STACK *st);
int sk_is_sorted(const _STACK *st);