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

Tony Arcieri notifications at github.com
Sat Apr 14 16:10:30 UTC 2018


@n3npq I'm working on simplifying the API and also switching from a `StreamingIterator` to a regular `Iterator` by using reference counting on header data. I had a question about this though:

> The trickiest problem with header tag data and MINMEM is that the header reference count sometimes ends up protecting header tag data, whether by intent or by accident is arguable.

What's the best way to model the lifetime of the tag data? It sounds like you're describing what I'd like to do: bound the lifetime of the header on the tag data, i.e. as long as someone holds on to a reference to tag data, they will also have to hold a reference to the header, and the header's reference count won't be decremented until they release both.

Is that a good approach, or can I do reference counting on the tag data itself?

-- 
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-381339992
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180414/9caff43c/attachment.html>


More information about the Rpm-maint mailing list