scm/c++: fix review issues in handler code

- Fix comments and some debug strings (copy-pasta)
- Fix mime-stream destruction (g_object_unref)
- Fix type-checking of scm types
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-21 23:31:58 +03:00
committed by Seth Ladygo
parent 2c2bc317f3
commit 60ed8f1a12
5 changed files with 38 additions and 23 deletions

View File

@ -167,9 +167,13 @@ subr_cc_store_mfind(SCM store_scm, SCM query_scm, SCM related_scm, SCM skip_dups
SCM msgs{SCM_EOL};
// iterate in reverse order, so the message get consed
// into the list in the right order.
for (auto it{qres->end()}; it-- != qres->begin();)
if (auto plist{it.document()->get_data()}; !plist.empty())
for (auto it{qres->end()}; it-- != qres->begin();) {
const auto doc{it.document()};
if (!doc)
continue; // e.g., removed since the query ran
if (auto plist{doc->get_data()}; !plist.empty())
msgs = scm_cons(to_scm(plist), msgs);
}
return msgs;
} catch (const ScmError& err) {