From 0aacded47419a204191315ce8868d0a4b625660e Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Thu, 17 Oct 2024 19:43:16 +0200 Subject: [PATCH] ruby: Implement Enumerable for libdnf5::rpm::ReldepList. --- bindings/libdnf5/rpm.i | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/libdnf5/rpm.i b/bindings/libdnf5/rpm.i index 2e05670b5..80b7a66c0 100644 --- a/bindings/libdnf5/rpm.i +++ b/bindings/libdnf5/rpm.i @@ -10,6 +10,7 @@ // Mixin modules for Ruby. This has to be declared before inclusion of the // related header file. %mixin libdnf5::rpm::PackageSet "Enumerable"; +%mixin libdnf5::rpm::ReldepList "Enumerable"; #endif %include @@ -106,6 +107,11 @@ add_iterator(PackageSet) add_iterator(ReldepList) add_ruby_each(libdnf5::rpm::PackageSet) +// Reldep needs special treatment so that the add_ruby_each can use it. +#if defined(SWIGRUBY) +fix_swigtype_trait(libdnf5::rpm::Reldep) +#endif +add_ruby_each(libdnf5::rpm::ReldepList) %feature("director") TransactionCallbacks; %include "libdnf5/rpm/transaction_callbacks.hpp"