add thread support based in proposal #398495 by Joseph Winston
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7929 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cb852a98fd
commit
0fd2fe23cf
16 changed files with 337 additions and 37 deletions
|
|
@ -25,7 +25,9 @@
|
|||
::asptr(items, val);
|
||||
}
|
||||
if (val) {
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
PyErr_SetString(PyExc_TypeError, "a dictionary is expected");
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -41,8 +43,10 @@
|
|||
size_type size = multimap.size();
|
||||
int pysize = (size <= (size_type) INT_MAX) ? (int) size : -1;
|
||||
if (pysize < 0) {
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"multimap size not valid in python");
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return NULL;
|
||||
}
|
||||
PyObject *obj = PyDict_New();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue