summaryrefslogtreecommitdiffstats
path: root/swig/plist.i
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-26 18:39:39 +0100
committerGravatar Jonathan Beck2009-10-26 18:39:39 +0100
commitbef50c0873aad5d8cd516428828e79fc05a43913 (patch)
treeee25a75e5d7e47b6178110a46844c5acd6c8152c /swig/plist.i
parent48032e8dffb48398ab79448c4db825e42f564f43 (diff)
downloadlibplist-bef50c0873aad5d8cd516428828e79fc05a43913.tar.gz
libplist-bef50c0873aad5d8cd516428828e79fc05a43913.tar.bz2
Fix SwigPyIterators name depending on version of SWIG.
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