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:
Marcelo Matus 2005-02-22 19:52:43 +00:00
commit 8dd4c07eeb
2 changed files with 12 additions and 12 deletions

View file

@ -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);