summaryrefslogtreecommitdiff
path: root/swig
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2013-05-02 07:50:44 -0400
committerGui Chen <gui.chen@intel.com>2013-05-02 07:58:46 -0400
commit914e5481ce686d2111bc211114e759755581c9ee (patch)
treed9f1663af5409d452a793d42c3f73a3a69e42ee2 /swig
parentfa4f0252f27fab99db4ad665a549e8a5ba04a63b (diff)
downloadlibzypp-bindings-914e5481ce686d2111bc211114e759755581c9ee.tar.gz
libzypp-bindings-914e5481ce686d2111bc211114e759755581c9ee.tar.bz2
libzypp-bindings-914e5481ce686d2111bc211114e759755581c9ee.zip
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 <gui.chen@intel.com>
Diffstat (limited to 'swig')
-rw-r--r--swig/Package.i3
-rw-r--r--swig/Patch.i3
-rw-r--r--swig/Pattern.i6
-rw-r--r--swig/Product.i4
-rw-r--r--swig/SrcPackage.i4
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 <zypp/Package.h>
+typedef ::zypp::intrusive_ptr<const Package> Package_constPtr;
+%template(Package_constPtr) ::zypp::intrusive_ptr<const Package>;
+
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 <zypp/Patch.h> \ No newline at end of file
+%include <zypp/Patch.h>
+
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 <zypp/Pattern.h> \ No newline at end of file
+%include <zypp/Pattern.h>
+
+typedef ::zypp::intrusive_ptr<const Pattern> Pattern_constPtr;
+%template(Pattern_constPtr) ::zypp::intrusive_ptr<const Pattern>;
+
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 <zypp/Product.h>
+
+typedef ::zypp::intrusive_ptr<const Product> Product_constPtr;
+%template(Product_constPtr) ::zypp::intrusive_ptr<const Product>;
+
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 <zypp/SrcPackage.h>;
+
+typedef ::zypp::intrusive_ptr<const SrcPackage> SrcPackage_constPtr;
+%template(SrcPackage_constPtr) ::zypp::intrusive_ptr<const SrcPackage>;
+