![]() `SetConstIterator::operator*` returns a reference, this is visible in cpp and the user behaves accordingly. In Python the user expects automatic memory management, the object returned from query iterator should be valid as long as there is a reference to it. To ensure this add swig typemaps that copy the returned object. It works because none of the queries (RepoQeury, GroupQuery, EnvironmentQuery) store the actual data. They just store some kind of proxy (RepoWeakPtr or wrapped libsolv ids) so if we copy the RepoWeakPtr it still points to the same Repo object. The PackageQuery and AdvisoryQuery return by value even in cpp so they don't have this problem. |
||
---|---|---|
.. | ||
go | ||
libdnf5 | ||
libdnf5_cli | ||
perl5 | ||
python3 | ||
ruby | ||
CMakeLists.txt |