[PATCH 0/3] API: add notes on lifetimes
nomumali.rhn at porcupinefactory.org
Sun Dec 23 02:08:29 PST 2018
On Mon, 17 Dec 2018 22:05:45 +0200
Tomi Ollila <tomi.ollila at iki.fi> wrote:
> On Mon, Dec 17 2018, rhn wrote:
> > Hi,
> > this patch series addresses API shortcomings that were found while working on the Rust bindings .
> > The first two patches address the problem that the docs never clearly state when messages obtained as replies are destroyed, while the last patch fixes abroken API example.
> > Thanks for Dirk Van Haerenborgh for working out how long notmuch objects live.
> Looks good. Have to trust that change in example is correct (why would it
> not be?) I hope tests pass :D
The tests obviously pass, you can check them yourself. They are unfortunately prone to false negatives (e.g. passes when it shouldn't), because freed memory can still be sometimes accessed.
They could be detected more reliably if valgrind's memcheck was part of the test suite, but I think this patch still adds value.
I'm eagerly hoping for a merge!
> > Cheers,
> > rhn
> >  https://github.com/vhdirk/notmuch-rs
> > rhn (3):
> > lib: Explicitly state when replies will be destroyed
> > test: Check for replies obeying lifetime guarantees
> > docs: Use correct call to notmuch_query_search_threads in usage
> > example
> > lib/notmuch.h | 10 ++++-
> > test/T720-lib-lifetime.sh | 83 +++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 92 insertions(+), 1 deletion(-)
> > create mode 100755 test/T720-lib-lifetime.sh
> > --
> > 2.17.2
> > _______________________________________________
> > notmuch mailing list
> > notmuch at notmuchmail.org
> > https://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch