summaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-18 22:00:08 +0200
committerGravatar Jonathan Beck2009-10-18 22:00:08 +0200
commit4c402e229e37fb48f50b07dd31e38e233ac7f184 (patch)
treef01a44f67444cd4302cb983223f17e58c5b89c38 /swig
parentf85fa802a4fb23c0a9fa09b6dd8e052fa05a40d0 (diff)
downloadlibplist-4c402e229e37fb48f50b07dd31e38e233ac7f184.tar.gz
libplist-4c402e229e37fb48f50b07dd31e38e233ac7f184.tar.bz2
Surround python specific stuff with proper #ifdef.
Diffstat (limited to 'swig')
-rw-r--r--swig/plist.i6
1 files changed, 5 insertions, 1 deletions
diff --git a/swig/plist.i b/swig/plist.i
index 1d343b0..4ba0ad3 100644
--- a/swig/plist.i
+++ b/swig/plist.i
@@ -135,6 +135,7 @@ namespace std {
%template(MapStringNodePtr) map<string,PList::Node*>;
}
+#if SWIGPYTHON
%rename(__assign__) *::operator=;
%rename(__getitem__) *::operator[];
%rename(__delitem__) *::Remove;
@@ -150,6 +151,7 @@ namespace std {
%rename(from_bin) *::FromBin;
%rename(append) *::Append;
%rename(insert) PList::Array::Insert;
+#endif
%ignore GetPlist();
%ignore Boolean(plist_t);
@@ -176,7 +178,7 @@ namespace std {
%include <plist/Dictionary.h>
%include <plist/Utils.h>
-
+#if SWIGPYTHON
%extend PList::Dictionary {
%newobject key_iterator(PyObject **PYTHON_SELF);
@@ -265,6 +267,8 @@ namespace std {
%pythoncode {def iterkeys(self): return self.key_iterator()}
%pythoncode {def itervalues(self): return self.value_iterator()}
}
+#endif
+
//deprecated wrapper below