fix empty map bug
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
693487a845
commit
8dd4c07eeb
2 changed files with 12 additions and 12 deletions
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
static PyObject *from(const multimap_type& multimap) {
|
||||
size_type size = multimap.size();
|
||||
int pysize = size <= INT_MAX ? (int) size : 0;
|
||||
if (!pysize) {
|
||||
int pysize = (size <= (size_type) INT_MAX) ? (int) size : -1;
|
||||
if (pysize < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"multimap size not valid in python");
|
||||
Py_INCREF(Py_None);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue