summaryrefslogtreecommitdiffstats
path: root/swig/plist.i
diff options
context:
space:
mode:
Diffstat (limited to 'swig/plist.i')
-rw-r--r--swig/plist.i11
1 files changed, 9 insertions, 2 deletions
diff --git a/swig/plist.i b/swig/plist.i
index 4ba0ad3..2d5dfa7 100644
--- a/swig/plist.i
+++ b/swig/plist.i
@@ -179,15 +179,20 @@ namespace std {
%include <plist/Utils.h>
#if SWIGPYTHON
+
+#if SWIG_VERSION <= 0x010336
+#define SwigPyIterator PySwigIterator
+#endif
+
%extend PList::Dictionary {
%newobject key_iterator(PyObject **PYTHON_SELF);
- swig::PySwigIterator* key_iterator(PyObject **PYTHON_SELF) {
+ swig::SwigPyIterator* key_iterator(PyObject **PYTHON_SELF) {
return swig::make_output_key_iterator(self->Begin(), self->Begin(), self->End(), *PYTHON_SELF);
}
%newobject value_iterator(PyObject **PYTHON_SELF);
- swig::PySwigIterator* value_iterator(PyObject **PYTHON_SELF) {
+ swig::SwigPyIterator* value_iterator(PyObject **PYTHON_SELF) {
return swig::make_output_value_iterator(self->Begin(), self->Begin(), self->End(), *PYTHON_SELF);
}
@@ -267,6 +272,8 @@ namespace std {
%pythoncode {def iterkeys(self): return self.key_iterator()}
%pythoncode {def itervalues(self): return self.value_iterator()}
}
+
+#undef SwigPyIterator
#endif