From 3aceb94b9e6ac4722b96d4fb1cf7e1a4358941e0 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 16 Jun 2000 23:29:26 +0000 Subject: Safe stack reorganisation in terms of function casts. After some messing around this seems to work but needs a few more tests. Working out the syntax for sk_set_cmp_func() (cast it to a function that itself returns a function pointer) was painful :-( Needs some testing to see what other compilers think of this syntax. Also needs similar stuff for ASN1_SET_OF etc etc. --- crypto/stack/stack.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crypto/stack/stack.h') diff --git a/crypto/stack/stack.h b/crypto/stack/stack.h index 6f5b4bdce2..8b436ca4b9 100644 --- a/crypto/stack/stack.h +++ b/crypto/stack/stack.h @@ -73,9 +73,6 @@ typedef struct stack_st int (*comp)(const char * const *, const char * const *); } STACK; -#define sk_new_null() sk_new((int (*)(const char * const *, \ - const char * const *))NULL) - #define M_sk_num(sk) ((sk) ? (sk)->num:-1) #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) @@ -85,6 +82,7 @@ char *sk_value(const STACK *, int); char *sk_set(STACK *, int, char *); STACK *sk_new(int (*cmp)(const char * const *, const char * const *)); +STACK *sk_new_null(void); void sk_free(STACK *); void sk_pop_free(STACK *st, void (*func)(void *)); int sk_insert(STACK *sk,char *data,int where); -- cgit v1.2.3