Rename DECLARE*STACK_OF to DEFINE*STACK_OF
Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -117,7 +117,7 @@ extern "C" {
|
||||
|
||||
# define STACK_OF(type) struct stack_st_##type
|
||||
|
||||
# define SKM_DECLARE_STACK_OF(t1, t2, t3) \
|
||||
# define SKM_DEFINE_STACK_OF(t1, t2, t3) \
|
||||
STACK_OF(t1); \
|
||||
static ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
@@ -212,9 +212,9 @@ extern "C" {
|
||||
return (int (*)(const t3 * const *,const t3 * const *))sk_set_cmp_func((_STACK *)sk, (int (*)(const void *a, const void *b))cmpf); \
|
||||
}
|
||||
|
||||
# define DECLARE_SPECIAL_STACK_OF(t1, t2) SKM_DECLARE_STACK_OF(t1, t2, t2)
|
||||
# define DECLARE_STACK_OF(t) SKM_DECLARE_STACK_OF(t, t, t)
|
||||
# define DECLARE_CONST_STACK_OF(t) SKM_DECLARE_STACK_OF(t, const t, t)
|
||||
# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
|
||||
# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
|
||||
# define DEFINE_CONST_STACK_OF(t) SKM_DEFINE_STACK_OF(t, const t, t)
|
||||
|
||||
/*-
|
||||
* Strings are special: normally an lhash entry will point to a single
|
||||
@@ -240,14 +240,14 @@ typedef const char *OPENSSL_CSTRING;
|
||||
* chars. So, we have to implement STRING specially for STACK_OF. This is
|
||||
* dealt with in the autogenerated macros below.
|
||||
*/
|
||||
DECLARE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
|
||||
DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
|
||||
|
||||
/*
|
||||
* Similarly, we sometimes use a block of characters, NOT nul-terminated.
|
||||
* These should also be distinguished from "normal" stacks.
|
||||
*/
|
||||
typedef void *OPENSSL_BLOCK;
|
||||
DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
|
||||
DEFINE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
|
||||
|
||||
/*
|
||||
* This file is automatically generated by util/mkstack.pl
|
||||
|
||||
Reference in New Issue
Block a user