diff options
author | tux <tux@linux-bjx7.site> | 2012-02-24 14:11:21 +0100 |
---|---|---|
committer | tux <tux@linux-bjx7.site> | 2012-02-24 14:11:21 +0100 |
commit | dded159e52cf383a02d9c599247190ca5708f902 (patch) | |
tree | c7a701b8a03efe2a4c9bc2a5b7a5d259622e0500 | |
parent | 12a94cdbe726ba0609f078176bc7f7668b022d7f (diff) | |
download | libzypp-bindings-dded159e52cf383a02d9c599247190ca5708f902.tar.gz libzypp-bindings-dded159e52cf383a02d9c599247190ca5708f902.tar.bz2 libzypp-bindings-dded159e52cf383a02d9c599247190ca5708f902.zip |
SLE11 still contain only swig 1.3.36 so work also with old swig
-rw-r--r-- | swig/ResPool.i | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/swig/ResPool.i b/swig/ResPool.i index f6d8d2e..34f3eb5 100644 --- a/swig/ResPool.i +++ b/swig/ResPool.i @@ -65,17 +65,29 @@ iter3(ResPool, zypp::PoolItem*); #ifdef SWIGPYTHON %newobject ResPool::const_iterator(PyObject **PYTHON_SELF); %extend ResPool { +#if SWIG_VERSION > 0x010336 swig::SwigPyIterator* iterator(PyObject **PYTHON_SELF) +#else + swig::PySwigIterator* iterator(PyObject **PYTHON_SELF) +#endif { return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } +#if SWIG_VERSION > 0x010336 swig::SwigPyIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r) +#else + swig::PySwigIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r) +#endif { return swig::make_output_iterator(self->byKindBegin( kind_r ), self->byKindBegin( kind_r ), self->byKindEnd( kind_r ), *PYTHON_SELF); } +#if SWIG_VERSION > 0x010336 swig::SwigPyIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name) +#else + swig::PySwigIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name) +#endif { return swig::make_output_iterator(self->byNameBegin( name ), self->byNameBegin( name ), self->byNameEnd( name ), *PYTHON_SELF); |