diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-11-09 11:27:13 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-12-21 09:11:59 +0100 |
commit | 3f0be2c206498b3fa3dd0a4dd94e31eb43d04c4a (patch) | |
tree | 4ff7bae423d4a6d6b138892175cedde2f92f3779 | |
parent | Make SSL_clear_options pass new options to record layer (diff) | |
download | openssl-3f0be2c206498b3fa3dd0a4dd94e31eb43d04c4a.tar.xz openssl-3f0be2c206498b3fa3dd0a4dd94e31eb43d04c4a.zip |
list.h: Allow separation of declarations and function definitions
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)
-rw-r--r-- | include/internal/list.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/internal/list.h b/include/internal/list.h index fdd356c407..de2a102cd4 100644 --- a/include/internal/list.h +++ b/include/internal/list.h @@ -30,12 +30,14 @@ OSSL_LIST_DBG(struct ossl_list_st_ ## name *list) \ } ossl_list_ ## name -# define DEFINE_LIST_OF(name, type) \ +# define DECLARE_LIST_OF(name, type) \ typedef struct ossl_list_st_ ## name OSSL_LIST(name); \ struct ossl_list_st_ ## name { \ type *alpha, *omega; \ size_t num_elems; \ - }; \ + } \ + +# define DEFINE_LIST_OF_IMPL(name, type) \ static ossl_unused ossl_inline void \ ossl_list_##name##_init(OSSL_LIST(name) *list) \ { \ @@ -166,4 +168,8 @@ } \ struct ossl_list_st_ ## name +# define DEFINE_LIST_OF(name, type) \ + DECLARE_LIST_OF(name, type); \ + DEFINE_LIST_OF_IMPL(name, type) + #endif |