Fixed PyGetSetDescr for python3.2.
Fixed memory management in special_variable_macros test. Don't define asdict() for multimap. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cba65bd524
commit
a52612f845
7 changed files with 53 additions and 19 deletions
|
|
@ -168,10 +168,6 @@
|
|||
swig::SwigPyIterator* iteritems(PyObject **PYTHON_SELF) {
|
||||
return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
|
||||
}
|
||||
|
||||
PyObject* asdict() {
|
||||
return swig::traits_from< Map >::asdict(*self);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
@ -292,14 +288,17 @@
|
|||
void __setitem__(const key_type& key) {
|
||||
self->erase(key);
|
||||
}
|
||||
}
|
||||
|
||||
%extend {
|
||||
void __setitem__(const key_type& key, const mapped_type& x) throw (std::out_of_range) {
|
||||
(*self)[key] = x;
|
||||
}
|
||||
|
||||
PyObject* asdict() {
|
||||
return swig::traits_from< Map >::asdict(*self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
%enddef
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue