Skip to content

Commit

Permalink
Add definition of object for swig
Browse files Browse the repository at this point in the history
Object std::pair<std::vector<std::vector<std::string>>,
libdnf::ModulePackageContainer::ModuleErrorType>; needs to be defined
in swig.
  • Loading branch information
j-mracek committed Mar 18, 2020
1 parent bb8b51a commit 639962f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindings/swig/module.i
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define DEPRECATED(x)

%include <std_map.i>
%include <std_pair.i>
%include <std_vector.i>
%include <std_string.i>

Expand Down Expand Up @@ -43,6 +44,7 @@ typedef int Id;
// this must follow std_vector_ext.i include, otherwise it returns garbage instead of list of strings
%template(MapStringVectorString) std::map<std::string, std::vector<std::string>>;
%template(VectorMapStringVectorString) std::vector<std::map<std::string, std::vector<std::string>>>;
%template(VectorVectorString) std::vector<std::vector<std::string>>;

// make SWIG wrap following headers
%nodefaultctor libdnf::ModulePackage;
Expand All @@ -58,3 +60,4 @@ typedef int Id;
%include "libdnf/module/ModulePackageContainer.hpp"
%include "libdnf/module/modulemd/ModuleProfile.hpp"
%include "libdnf/module/modulemd/ModuleDependencies.hpp"
%template(PairVectorVectorStringModuleErrorType) std::pair<std::vector<std::vector<std::string>>, libdnf::ModulePackageContainer::ModuleErrorType>;

0 comments on commit 639962f

Please sign in to comment.