Release the GIL when calling the function generated for CppMethod objects.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-05-10 22:38:57 +00:00
parent 21a4a98cb7
commit 6742c20040

View File

@@ -747,6 +747,7 @@ from %s import *
stream.write('sipCpp = %s(%s);\n' % (fname, pnames))
else:
stream.write('PyErr_Clear();\n')
stream.write('Py_BEGIN_ALLOW_THREADS\n')
stream.write(indent+' '*4)
if method.type != 'void':
stream.write('sipRes = ')
@@ -761,6 +762,7 @@ from %s import *
stream.write('%s(sipCpp%s);\n' % (fname, pnames))
else:
stream.write('%s(%s);\n' % (fname, pnames))
stream.write('Py_END_ALLOW_THREADS\n')
stream.write('%sif (PyErr_Occurred()) sipIsErr = 1;\n' % (indent+' '*4))
stream.write('%s%%End\n' % indent)