aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index b3c384c2771..f3511aaf7b8 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -749,7 +749,7 @@ const char *
_PyImport_ResolveNameWithPackageContext(const char *name)
{
#ifndef HAVE_THREAD_LOCAL
- PyThread_acquire_lock(EXTENSIONS.mutex, WAIT_LOCK);
+ PyMutex_Lock(&EXTENSIONS.mutex);
#endif
if (PKGCONTEXT != NULL) {
const char *p = strrchr(PKGCONTEXT, '.');
@@ -759,7 +759,7 @@ _PyImport_ResolveNameWithPackageContext(const char *name)
}
}
#ifndef HAVE_THREAD_LOCAL
- PyThread_release_lock(EXTENSIONS.mutex);
+ PyMutex_Unlock(&EXTENSIONS.mutex);
#endif
return name;
}
@@ -768,12 +768,12 @@ const char *
_PyImport_SwapPackageContext(const char *newcontext)
{
#ifndef HAVE_THREAD_LOCAL
- PyThread_acquire_lock(EXTENSIONS.mutex, WAIT_LOCK);
+ PyMutex_Lock(&EXTENSIONS.mutex);
#endif
const char *oldcontext = PKGCONTEXT;
PKGCONTEXT = newcontext;
#ifndef HAVE_THREAD_LOCAL
- PyThread_release_lock(EXTENSIONS.mutex);
+ PyMutex_Unlock(&EXTENSIONS.mutex);
#endif
return oldcontext;
}