diff Modules/socketmodule.h @ 44439:0cbe94bea2c7 legacy-trunk

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
author Christian Heimes <christian@cheimes.de>
date Thu, 03 Jan 2008 22:16:32 +0000
parents 90e22fea8363
children bfed70277ab3
line wrap: on
line diff
--- a/Modules/socketmodule.h	Thu Jan 03 21:14:48 2008 +0000
+++ b/Modules/socketmodule.h	Thu Jan 03 22:16:32 2008 +0000
@@ -222,7 +222,7 @@
 	void *api;
 
 	DPRINTF("Importing the %s C API...\n", apimodule);
-	mod = PyImport_ImportModule(apimodule);
+	mod = PyImport_ImportModuleNoBlock(apimodule);
 	if (mod == NULL)
 		goto onError;
 	DPRINTF(" %s package found\n", apimodule);