diff options
| author | David Bremner <david@tethera.net> | 2020-07-14 08:25:28 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-22 19:52:55 -0300 |
| commit | 095d3d7134f5668b96cf1d70997d3f110b03c898 (patch) | |
| tree | b8797c00c8898b2e7b26172e91e0ee24b94837cc /lib/database-private.h | |
| parent | 920dc56e605405bb7413d958ac80b8b84d7a8a0f (diff) | |
lib: move deallocation of memory from n_d_close to n_d_destroy
In order to mimic the "best effort" API of Xapian to provide
information from a closed database when possible, do not
destroy the Xapian database object too early.
Because the pointer to a Xapian database is no longer nulled on close,
introduce a flag to track whether the notmuch database is open or not.
Diffstat (limited to 'lib/database-private.h')
| -rw-r--r-- | lib/database-private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/database-private.h b/lib/database-private.h index 76359007..d2c25313 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -194,7 +194,7 @@ struct _notmuch_database { /* true if changes have been made in this atomic section */ bool atomic_dirty; Xapian::Database *xapian_db; - + bool open; /* Bit mask of features used by this database. This is a * bitwise-OR of NOTMUCH_FEATURE_* values (above). */ enum _notmuch_features features; |
