diff options
author | Christian Heimes <christian@cheimes.de> | 2008-01-03 22:16:32 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-01-03 22:16:32 (GMT) |
commit | 000a074c955a1964959ee908300ef49b41170a06 (patch) | |
tree | af32b732d8b3285969bd524a4af25b6533adbb4c /Mac/Modules | |
parent | 0a83d79268e9d2b36decc78845cf71baced4ccc6 (diff) | |
download | cpython-000a074c955a1964959ee908300ef49b41170a06.zip cpython-000a074c955a1964959ee908300ef49b41170a06.tar.gz cpython-000a074c955a1964959ee908300ef49b41170a06.tar.bz2 |
Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/MacOS.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c index 4eabb39..3fe6e0d 100644 --- a/Mac/Modules/MacOS.c +++ b/Mac/Modules/MacOS.c @@ -357,7 +357,7 @@ MacOS_GetErrorString(PyObject *self, PyObject *args) PyObject *m, *rv; errors_loaded = 1; - m = PyImport_ImportModule("macresource"); + m = PyImport_ImportModuleNoBlock("macresource"); if (!m) { if (Py_VerboseFlag) PyErr_Print(); |