[Rpm-maint] [rpm-software-management/rpm] Rust bindings for rpmlib (#429)

Tony Arcieri notifications at github.com
Fri Apr 13 17:18:57 UTC 2018


@n3npq a few questions about something you said earlier:

> RPM object (like ts, h, db) is ref-counted, but the counter increment is not atomic.

When are the reference counts incremented/decremented, and can I bump them externally? If so, I could have Rust increment the reference count when it takes a reference, and decrement it on drop.

> With MINMEM, the tag data should be treated as if it were read-only (but during header load/unload integer data will be swabbed).

I have the read-only part covered in that I am giving out immutable references, however I'm still a bit unclear on what happens with header load/unload and in particular how that relates to taking the next item in a match iterator.

If possible I think it'd be great if I could use Rust's regular [Iterator](https://doc.rust-lang.org/std/iter/trait.Iterator.html) type for RPM's match iterators, however for that to work all data the iterator references must live at least as long as the iterator itself. Is that possible?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/429#issuecomment-381203705
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180413/aa43e7b7/attachment-0001.html>


More information about the Rpm-maint mailing list