summaryrefslogtreecommitdiff
path: root/swig
diff options
context:
space:
mode:
authorMichael Andres <ma@suse.de>2008-09-05 17:20:01 +0000
committerMichael Andres <ma@suse.de>2008-09-05 17:20:01 +0000
commite3044ac0414c71700436abde699c8487a157355d (patch)
treebf443a66a0d384209f90a56ce122d637caac9437 /swig
parentc6fcfe47d295c4c8dabc469836fd6f4e87bbe529 (diff)
downloadlibzypp-bindings-e3044ac0414c71700436abde699c8487a157355d.tar.gz
libzypp-bindings-e3044ac0414c71700436abde699c8487a157355d.tar.bz2
libzypp-bindings-e3044ac0414c71700436abde699c8487a157355d.zip
fix asKind/isKind
Diffstat (limited to 'swig')
-rw-r--r--swig/Package.i1
-rw-r--r--swig/ResTraits.i39
2 files changed, 23 insertions, 17 deletions
diff --git a/swig/Package.i b/swig/Package.i
index ec6f118..734c59d 100644
--- a/swig/Package.i
+++ b/swig/Package.i
@@ -1,3 +1,4 @@
//%ignore zypp::Package::checksum();
+
%include <zypp/Package.h>
diff --git a/swig/ResTraits.i b/swig/ResTraits.i
index 0b24cac..664113d 100644
--- a/swig/ResTraits.i
+++ b/swig/ResTraits.i
@@ -32,28 +32,33 @@ namespace zypp
// - asKind* to convert a ResObject/PoolItem into a
// specific *_constPtr.
%define %STUFF(X)
-typedef intrusive_ptr<const X> X##_constPtr;
-typedef intrusive_ptr<X> X##_Ptr;
-
-%template(X##_constPtr) zypp::intrusive_ptr<const X>;
-%template(X##_Ptr) zypp::intrusive_ptr<X>;
+namespace zypp
+{
+ typedef intrusive_ptr<const X> X##_constPtr;
+ typedef intrusive_ptr<X> X##_Ptr;
+ %template(X##_constPtr) intrusive_ptr<const X>;
+ %template(X##_Ptr) intrusive_ptr<X>;
-bool isKind##X( const Resolvable::constPtr & p );
-bool isKind##X( const PoolItem & p );
+ bool isKind##X( const zypp::Resolvable::constPtr & p );
+ bool isKind##X( const zypp::PoolItem & p );
-X##_constPtr asKind##X( const Resolvable::constPtr & p );
-X##_constPtr asKind##X( const PoolItem & p );
+ X##_constPtr asKind##X( const zypp::Resolvable::constPtr & p );
+ X##_constPtr asKind##X( const zypp::PoolItem & p );
+}
%header
{
- inline bool isKind##X( const Resolvable::constPtr & p )
- { return isKind<X>( p ); }
- inline bool isKind##X( const PoolItem & p )
- { return isKind<X>( p.resolvable() ); }
- inline X::constPtr asKind##X( const Resolvable::constPtr & p )
- { return asKind<X>( p ); }
- inline X::constPtr asKind##X( const PoolItem & p )
- { return asKind<X>( p.resolvable() ); }
+ namespace zypp
+ {
+ inline bool isKind##X( const zypp::Resolvable::constPtr & p )
+ { return isKind<X>( p ); }
+ inline bool isKind##X( const zypp::PoolItem & p )
+ { return isKind<X>( p.resolvable() ); }
+ inline X::constPtr asKind##X( const zypp::Resolvable::constPtr & p )
+ { return asKind<X>( p ); }
+ inline X::constPtr asKind##X( const zypp::PoolItem & p )
+ { return asKind<X>( p.resolvable() ); }
+ }
}
#if defined(SWIGPYTHON)