From 914e5481ce686d2111bc211114e759755581c9ee Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Thu, 2 May 2013 07:50:44 -0400 Subject: fix const pointer lost its namespace try to build python-zypp with swig 2.0.7 or newer, the *_constPtr always lost its namespace Signed-off-by: Gui Chen --- swig/Package.i | 3 +++ swig/Patch.i | 3 ++- swig/Pattern.i | 6 +++++- swig/Product.i | 4 ++++ swig/SrcPackage.i | 4 ++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/swig/Package.i b/swig/Package.i index 734c59d..1335ff0 100644 --- a/swig/Package.i +++ b/swig/Package.i @@ -2,3 +2,6 @@ %include +typedef ::zypp::intrusive_ptr Package_constPtr; +%template(Package_constPtr) ::zypp::intrusive_ptr; + diff --git a/swig/Patch.i b/swig/Patch.i index acd62b4..6a1e091 100644 --- a/swig/Patch.i +++ b/swig/Patch.i @@ -2,4 +2,5 @@ %ignore zypp::Patch::affects_pkg_manager; %ignore zypp::Patch::id; -%include \ No newline at end of file +%include + diff --git a/swig/Pattern.i b/swig/Pattern.i index 3d88887..a2b73f3 100644 --- a/swig/Pattern.i +++ b/swig/Pattern.i @@ -1 +1,5 @@ -%include \ No newline at end of file +%include + +typedef ::zypp::intrusive_ptr Pattern_constPtr; +%template(Pattern_constPtr) ::zypp::intrusive_ptr; + diff --git a/swig/Product.i b/swig/Product.i index 4b8ce3f..67e704c 100644 --- a/swig/Product.i +++ b/swig/Product.i @@ -1,2 +1,6 @@ %ignore zypp::Product::type; %include + +typedef ::zypp::intrusive_ptr Product_constPtr; +%template(Product_constPtr) ::zypp::intrusive_ptr; + diff --git a/swig/SrcPackage.i b/swig/SrcPackage.i index b239fe6..c7b9c57 100644 --- a/swig/SrcPackage.i +++ b/swig/SrcPackage.i @@ -1 +1,5 @@ %include ; + +typedef ::zypp::intrusive_ptr SrcPackage_constPtr; +%template(SrcPackage_constPtr) ::zypp::intrusive_ptr; + -- cgit v1.2.3