Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C6A366DE014D for ; Mon, 27 Jun 2016 11:39:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=-0.006, HEADER_FROM_DIFFERENT_DOMAINS=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SOUpspIHCQFu for ; Mon, 27 Jun 2016 11:38:52 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 6D06B6DE00CC for ; Mon, 27 Jun 2016 11:38:51 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84) (envelope-from ) id 1bHbQV-0004zc-Gh; Mon, 27 Jun 2016 14:38:31 -0400 Received: (nullmailer pid 18092 invoked by uid 1000); Mon, 27 Jun 2016 18:38:44 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH] doc: forbid further operations on a closed database Date: Mon, 27 Jun 2016 20:38:40 +0200 Message-Id: <1467052720-18041-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.8.1 In-Reply-To: <87porqxmm5.fsf@tesseract.cs.unb.ca> References: <87porqxmm5.fsf@tesseract.cs.unb.ca> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2016 18:39:00 -0000 We could add many null pointer checks, but currently I don't see a use case that justifies it. --- lib/notmuch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index d4a97cb..2faa146 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -332,7 +332,9 @@ notmuch_database_status_string (const notmuch_database_t *notmuch); * functions on objects derived from this database may either behave * as if the database had not been closed (e.g., if the required data * has been cached) or may fail with a - * NOTMUCH_STATUS_XAPIAN_EXCEPTION. + * NOTMUCH_STATUS_XAPIAN_EXCEPTION. The only further operation + * permitted on the database itself is to call + * notmuch_database_destroy. * * notmuch_database_close can be called multiple times. Later calls * have no effect. -- 2.8.1