From c128c995bc3e7474d4086af7e2066f60f54329b2 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 12 Jun 2021 10:26:16 -0300 Subject: [PATCH] lib: make indexopts pointers opaque There is no reason for anything outside the indexopts.c compilation unit to have access to structure members. --- lib/indexopts.c | 4 ++++ lib/notmuch-private.h | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/indexopts.c b/lib/indexopts.c index 4a860858..2ffd1942 100644 --- a/lib/indexopts.c +++ b/lib/indexopts.c @@ -20,6 +20,10 @@ #include "notmuch-private.h" +struct _notmuch_indexopts { + _notmuch_crypto_t crypto; +}; + notmuch_indexopts_t * notmuch_database_get_default_indexopts (notmuch_database_t *db) { diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index e9ce74a4..3cc79bc4 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -711,9 +711,7 @@ _notmuch_thread_create (void *ctx, /* indexopts.c */ -struct _notmuch_indexopts { - _notmuch_crypto_t crypto; -}; +struct _notmuch_indexopts; #define CONFIG_HEADER_PREFIX "index.header."