diff options
Diffstat (limited to 'swig')
-rw-r--r-- | swig/ResStore.i | 24 | ||||
-rw-r--r-- | swig/zypp.i | 6 |
2 files changed, 26 insertions, 4 deletions
diff --git a/swig/ResStore.i b/swig/ResStore.i index fa1b8f9..a4012c6 100644 --- a/swig/ResStore.i +++ b/swig/ResStore.i @@ -34,3 +34,27 @@ iter2(ResStore, ResObject*); } } #endif + +#ifdef SWIGPERL5 + +%extend ResStore { + + ResStore::iterator begin() { + return self->begin(); + } + ResStore::iterator end() { + return self->end(); + } + ResStore::iterator iterator_incr(ResStore::iterator *it) { + (*it)++; + return *it; + } + const ResObject* iterator_value(ResStore::iterator it) { + return (&**it); + } + bool iterator_equal(ResStore::iterator it1, ResStore::iterator it2) { + return (it1 == it2); + } +}; + +#endif diff --git a/swig/zypp.i b/swig/zypp.i index 026c9aa..20a303f 100644 --- a/swig/zypp.i +++ b/swig/zypp.i @@ -110,10 +110,8 @@ class intrusive_ptr { %include "Package.i" %include "PublicKey.i" %include "KeyRing.i" -#ifndef SWIGPERL5 - %include "Target.i" - %include "MediaSetAccess.i" -#endif +%include "Target.i" +%include "MediaSetAccess.i" %include "PoolItem.i" %include "ResPool.i" %include "ResPoolManager.i" |