[PATCH 1/2] lib: make indexopts pointers opaque

Subject: [PATCH 1/2] lib: make indexopts pointers opaque

Date: Sat, 12 Jun 2021 10:26:16 -0300

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


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 093c29b1..65d42498 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."
 
-- 
2.30.2
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: