fix const pointer lost its namespace
authorGui Chen <gui.chen@intel.com>
Thu, 2 May 2013 11:50:44 +0000 (07:50 -0400)
committerGui Chen <gui.chen@intel.com>
Thu, 2 May 2013 11:58:46 +0000 (07:58 -0400)
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>
swig/Package.i
swig/Patch.i
swig/Pattern.i
swig/Product.i
swig/SrcPackage.i

index 734c59d..1335ff0 100644 (file)
@@ -2,3 +2,6 @@
 
 %include <zypp/Package.h>
 
+typedef ::zypp::intrusive_ptr<const Package> Package_constPtr;
+%template(Package_constPtr)        ::zypp::intrusive_ptr<const Package>;
+
index acd62b4..6a1e091 100644 (file)
@@ -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>
+
index 3d88887..a2b73f3 100644 (file)
@@ -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>;
+
index 4b8ce3f..67e704c 100644 (file)
@@ -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>;
+
index b239fe6..c7b9c57 100644 (file)
@@ -1 +1,5 @@
 %include <zypp/SrcPackage.h>;
+
+typedef ::zypp::intrusive_ptr<const SrcPackage> SrcPackage_constPtr;
+%template(SrcPackage_constPtr)        ::zypp::intrusive_ptr<const SrcPackage>;
+