diff --git a/bindings/libdnf5/advisory.i b/bindings/libdnf5/advisory.i index 726844f07..7a74005e1 100644 --- a/bindings/libdnf5/advisory.i +++ b/bindings/libdnf5/advisory.i @@ -25,11 +25,10 @@ } } -// TODO(jkolarik): advisory modules skipped for now - %{ #include "libdnf5/advisory/advisory.hpp" #include "libdnf5/advisory/advisory_package.hpp" + #include "libdnf5/advisory/advisory_module.hpp" #include "libdnf5/advisory/advisory_set.hpp" #include "libdnf5/advisory/advisory_set_iterator.hpp" #include "libdnf5/advisory/advisory_collection.hpp" @@ -47,11 +46,12 @@ %rename(value) libdnf5::advisory::AdvisorySetIterator::operator*(); %include "libdnf5/advisory/advisory_set_iterator.hpp" -%ignore libdnf5::advisory::AdvisoryCollection::get_modules(); +%include "libdnf5/advisory/advisory_module.hpp" %include "libdnf5/advisory/advisory_collection.hpp" %include "libdnf5/advisory/advisory_query.hpp" %include "libdnf5/advisory/advisory_reference.hpp" +%template(VectorAdvisoryModule) std::vector; %template(VectorAdvisoryCollection) std::vector; %template(VectorAdvisoryPackage) std::vector; %template(VectorAdvisoryReference) std::vector; diff --git a/bindings/libdnf5/shared.i b/bindings/libdnf5/shared.i index c2fbf5f89..269257b59 100644 --- a/bindings/libdnf5/shared.i +++ b/bindings/libdnf5/shared.i @@ -12,4 +12,12 @@ // From perl5 - utf8.h: conflicts with fmt/format.h header #undef utf8_to_utf16 + + // Recent versions of Perl (5.8.0) have namespace conflict problems. + // Perl defines a bunch of short macros to make the Perl API function names shorter. + // For example, in /usr/lib64/perl5/CORE/embed.h there is: + // #define get_context Perl_get_context + // We have to undefine that since we don't want our AdvisoryModule::get_context to + // be renamed to Perl_get_context + #undef get_context %}