From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sFqBKBe2xGAFLAAAgWs5BA (envelope-from ) for ; Sat, 12 Jun 2021 15:26:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2OMLJBe2xGAMZgAA1q6Kng (envelope-from ) for ; Sat, 12 Jun 2021 13:26:47 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5B43A244CA for ; Sat, 12 Jun 2021 15:26:47 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0BBBF2B27C; Sat, 12 Jun 2021 09:26:30 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5C6992B1E9 for ; Sat, 12 Jun 2021 09:26:24 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 54C3E5FD25; Sat, 12 Jun 2021 09:26:24 -0400 (EDT) Received: (nullmailer pid 813249 invoked by uid 1000); Sat, 12 Jun 2021 13:26:20 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 1/2] lib: make indexopts pointers opaque Date: Sat, 12 Jun 2021 10:26:16 -0300 Message-Id: <20210612132617.813170-2-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210612132617.813170-1-david@tethera.net> References: <20210612132617.813170-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: Z7ZZ6274AQSWCCP3O7BL7S6EAA6SSNID X-Message-ID-Hash: Z7ZZ6274AQSWCCP3O7BL7S6EAA6SSNID X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623504407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wMsYi1rRFm+hr4jtuUK+OrP6KsUJ7R6IJ4ACJKoXANc=; b=sOF9Ij0s8BFhidkE7q1AHVoh8UdWUg9TIUr20d+HkWbfB+Tl35evxqiKAxPC0pHSk630f4 27Vp36mDoiPcxoO/QUutpgPwd1Z5Xe6gUGKM7/WfRS/JzcudJ2ale/YJ/WUYt6eMKvlgOm HGK6PnGPvH3jAPtPxbwAy1EyQJic4osAQ19QGoSdsbEHXwUmaBpj5E0iKQkKYrUM7fzVMU gBIO1m/xqQfLJQdv/ZQ6sUdCPaY3Xbcpdn9U0szOIJsHtL2TXz5W/LLFBGJ8n6ccN09aa3 alCflNZzE41c64XHEu0xiZZneMkXnhZwHsafSLM2hlTZHDFcOUSVA+UVZJUt1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623504407; a=rsa-sha256; cv=none; b=T+bcsVWJyWDox/Yvb1FOiVoH35OZIzrytSQGGEgVsvKwaggwckyrZjtFBmreaQgEhnqGC1 hKhoizpstl7rD8GhjC0tZXJL+MP54DYyMZ7raCO/dGQ6ZnvRmMzV+UTxul/UQaAbg+xab1 TwIL1O5llT24vTd+/8/Z51avsU0tV/DowojJd5rGRJ1wa9ESy5VCqPETKqxPi9AxURc1dJ yHvJkEYZgvETr3onf1CXa+Fh6ev5gTIUnjwj/Dy6b17SdMbV4cGKP44MgKwtdyQH5WZdCs nJJk/IDysULg0gHfMaz1/Xiy3fIC7vmAhXobPoN4/TAPyR/j7KCnSbA+MpoXgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 5B43A244CA X-Spam-Score: -1.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: LnO4QskB5AuX 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