mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
Merge branch 'release'
new release candidate, with regexp fix
This commit is contained in:
commit
4e872c64e1
5 changed files with 33 additions and 7 deletions
|
@ -1,3 +1,3 @@
|
|||
# this file should be kept in sync with ../../../version
|
||||
__VERSION__ = '0.24~rc0'
|
||||
__VERSION__ = '0.24~rc1'
|
||||
SOVERSION = '4'
|
||||
|
|
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -1,3 +1,11 @@
|
|||
notmuch (0.24~rc1-1) experimental; urgency=medium
|
||||
|
||||
* New upstream release candidate
|
||||
* upstream release notes
|
||||
* One library internals fix/optimization for regexp processing.
|
||||
|
||||
-- David Bremner <bremner@debian.org> Wed, 08 Mar 2017 08:08:34 -0400
|
||||
|
||||
notmuch (0.24~rc0-1) experimental; urgency=medium
|
||||
|
||||
* New upstream feature release (candidate).
|
||||
|
|
|
@ -62,11 +62,6 @@ RegexpPostingSource::init (const Xapian::Database &db)
|
|||
it_ = db_.valuestream_begin (slot_);
|
||||
end_ = db.valuestream_end (slot_);
|
||||
started_ = false;
|
||||
|
||||
/* make sure we start on a matching value */
|
||||
while (!at_end() && regexec (®exp_, (*it_).c_str (), 0, NULL, 0) != 0) {
|
||||
++it_;
|
||||
}
|
||||
}
|
||||
|
||||
Xapian::doccount
|
||||
|
@ -113,6 +108,27 @@ RegexpPostingSource::next (unused (double min_wt))
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
RegexpPostingSource::skip_to (Xapian::docid did, unused (double min_wt))
|
||||
{
|
||||
started_ = true;
|
||||
it_.skip_to (did);
|
||||
for (; ! at_end (); ++it_) {
|
||||
std::string value = *it_;
|
||||
if (regexec (®exp_, value.c_str (), 0, NULL, 0) == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
RegexpPostingSource::check (Xapian::docid did, unused (double min_wt))
|
||||
{
|
||||
started_ = true;
|
||||
if (!it_.check (did) || at_end ())
|
||||
return false;
|
||||
return (regexec (®exp_, (*it_).c_str (), 0, NULL, 0) == 0);
|
||||
}
|
||||
|
||||
static inline Xapian::valueno _find_slot (std::string prefix)
|
||||
{
|
||||
if (prefix == "from")
|
||||
|
|
|
@ -56,6 +56,8 @@ class RegexpPostingSource : public Xapian::PostingSource
|
|||
Xapian::docid get_docid () const;
|
||||
bool at_end () const;
|
||||
void next (unused (double min_wt));
|
||||
void skip_to (Xapian::docid did, unused (double min_wt));
|
||||
bool check (Xapian::docid did, unused (double min_wt));
|
||||
};
|
||||
|
||||
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
0.24~rc0
|
||||
0.24~rc1
|
||||
|
|
Loading…
Reference in a new issue