diff options
| author | 2009-10-18 22:00:08 +0200 | |
|---|---|---|
| committer | 2009-10-18 22:00:08 +0200 | |
| commit | 4c402e229e37fb48f50b07dd31e38e233ac7f184 (patch) | |
| tree | f01a44f67444cd4302cb983223f17e58c5b89c38 | |
| parent | f85fa802a4fb23c0a9fa09b6dd8e052fa05a40d0 (diff) | |
| download | libplist-4c402e229e37fb48f50b07dd31e38e233ac7f184.tar.gz libplist-4c402e229e37fb48f50b07dd31e38e233ac7f184.tar.bz2 | |
Surround python specific stuff with proper #ifdef.
| -rw-r--r-- | swig/plist.i | 6 |
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 { | |||
| 135 | %template(MapStringNodePtr) map<string,PList::Node*>; | 135 | %template(MapStringNodePtr) map<string,PList::Node*>; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | #if SWIGPYTHON | ||
| 138 | %rename(__assign__) *::operator=; | 139 | %rename(__assign__) *::operator=; |
| 139 | %rename(__getitem__) *::operator[]; | 140 | %rename(__getitem__) *::operator[]; |
| 140 | %rename(__delitem__) *::Remove; | 141 | %rename(__delitem__) *::Remove; |
| @@ -150,6 +151,7 @@ namespace std { | |||
| 150 | %rename(from_bin) *::FromBin; | 151 | %rename(from_bin) *::FromBin; |
| 151 | %rename(append) *::Append; | 152 | %rename(append) *::Append; |
| 152 | %rename(insert) PList::Array::Insert; | 153 | %rename(insert) PList::Array::Insert; |
| 154 | #endif | ||
| 153 | 155 | ||
| 154 | %ignore GetPlist(); | 156 | %ignore GetPlist(); |
| 155 | %ignore Boolean(plist_t); | 157 | %ignore Boolean(plist_t); |
| @@ -176,7 +178,7 @@ namespace std { | |||
| 176 | %include <plist/Dictionary.h> | 178 | %include <plist/Dictionary.h> |
| 177 | %include <plist/Utils.h> | 179 | %include <plist/Utils.h> |
| 178 | 180 | ||
| 179 | 181 | #if SWIGPYTHON | |
| 180 | %extend PList::Dictionary { | 182 | %extend PList::Dictionary { |
| 181 | 183 | ||
| 182 | %newobject key_iterator(PyObject **PYTHON_SELF); | 184 | %newobject key_iterator(PyObject **PYTHON_SELF); |
| @@ -265,6 +267,8 @@ namespace std { | |||
| 265 | %pythoncode {def iterkeys(self): return self.key_iterator()} | 267 | %pythoncode {def iterkeys(self): return self.key_iterator()} |
| 266 | %pythoncode {def itervalues(self): return self.value_iterator()} | 268 | %pythoncode {def itervalues(self): return self.value_iterator()} |
| 267 | } | 269 | } |
| 270 | #endif | ||
| 271 | |||
| 268 | 272 | ||
| 269 | //deprecated wrapper below | 273 | //deprecated wrapper below |
| 270 | 274 | ||
