diff options
| author | David Bremner <david@tethera.net> | 2020-08-08 11:16:43 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-12-23 09:06:34 -0400 |
| commit | e34e2a68b62b50cc40e695d1a2690a7de382bba6 (patch) | |
| tree | 48009a0d92dafb6a603ad9f3c3208787102ed3d2 /lib/database-private.h | |
| parent | 59488ee9298d4c29da206ec76fe66242f592caa4 (diff) | |
lib: factor out feature name related code.
database.cc is uncomfortably large, and some of the static data
structures do not need to be shared as much as they are.
This is a somewhat small piece to factor out, but it will turn out to
be helpful to further refactoring.
Diffstat (limited to 'lib/database-private.h')
| -rw-r--r-- | lib/database-private.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/database-private.h b/lib/database-private.h index 041602cd..2d220811 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -32,6 +32,8 @@ #include "notmuch-private.h" +#define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0])) + #ifdef SILENCE_XAPIAN_DEPRECATION_WARNINGS #define XAPIAN_DEPRECATED(D) D #endif @@ -263,4 +265,16 @@ _notmuch_database_find_doc_ids (notmuch_database_t *notmuch, const char *value, Xapian::PostingIterator *begin, Xapian::PostingIterator *end); + +#define NOTMUCH_DATABASE_VERSION 3 + +/* features.cc */ + +_notmuch_features +_notmuch_database_parse_features (const void *ctx, const char *features, unsigned int version, + char mode, char **incompat_out); + +char * +_notmuch_database_print_features (const void *ctx, unsigned int features); + #endif |
