-#define STACK_OF(type) struct stack_st_##type
-
-#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/
-
-#define DECLARE_STACK_OF(type) \
-STACK_OF(type) \
- { \
- STACK stack; \
- }; \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_new( \
- int (*cmp)(const type * const *, const type *const *)) \
- { return (STACK_OF(type) *)sk_new((int (*)())cmp); } \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_new_null() \
- { return (STACK_OF(type) *)sk_new_null(); } \
-OPENSSL_INLINE void sk_##type##_free(STACK_OF(type) *sk) \
- { sk_free((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_num(const STACK_OF(type) *sk) \
- { return M_sk_num((const STACK *)sk); } \
-OPENSSL_INLINE type *sk_##type##_value(const STACK_OF(type) *sk,int n) \
- { return (type *)sk_value((STACK *)sk,n); } \
-OPENSSL_INLINE type *sk_##type##_set(STACK_OF(type) *sk,int n,type *v) \
- { return (type *)(sk_set((STACK *)sk,n,(char *)v)); } \
-OPENSSL_INLINE void sk_##type##_zero(STACK_OF(type) *sk) \
- { sk_zero((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_push(STACK_OF(type) *sk,type *v) \
- { return sk_push((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_unshift(STACK_OF(type) *sk,type *v) \
- { return sk_unshift((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_find(STACK_OF(type) *sk,type *v) \
- { return sk_find((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE type *sk_##type##_delete(STACK_OF(type) *sk,int n) \
- { return (type *)sk_delete((STACK *)sk,n); } \
-OPENSSL_INLINE void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v) \
- { sk_delete_ptr((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n) \
- { return sk_insert((STACK *)sk,(char *)v,n); } \
-OPENSSL_INLINE int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \
- int (*cmp)(const type * const *,const type * const *))) \
- (const type *const *,const type *const *) \
- { return (int (*)(const type * const *,const type *const *)) \
- sk_set_cmp_func((STACK *)sk,(int(*)(const char * const *, const char * const *))cmp); } \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk) \
- { return (STACK_OF(type) *)sk_dup((STACK *)sk); } \
-OPENSSL_INLINE void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)) \
- { sk_pop_free((STACK *)sk,(void (*)(void *))func); } \
-OPENSSL_INLINE type *sk_##type##_shift(STACK_OF(type) *sk) \
- { return (type *)sk_shift((STACK *)sk); } \
-OPENSSL_INLINE type *sk_##type##_pop(STACK_OF(type) *sk) \
- { return (type *)sk_pop((STACK *)sk); } \
-OPENSSL_INLINE void sk_##type##_sort(STACK_OF(type) *sk) \
- { sk_sort((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_is_sorted(const STACK_OF(type) *sk) \
- { return sk_is_sorted((const STACK *)sk); }