File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1+ Fix build failure on systems without thread-locals support.
Original file line number Diff line number Diff line change @@ -749,7 +749,7 @@ const char *
749749_PyImport_ResolveNameWithPackageContext (const char * name )
750750{
751751#ifndef HAVE_THREAD_LOCAL
752- PyThread_acquire_lock ( EXTENSIONS .mutex , WAIT_LOCK );
752+ PyMutex_Lock ( & EXTENSIONS .mutex );
753753#endif
754754 if (PKGCONTEXT != NULL ) {
755755 const char * p = strrchr (PKGCONTEXT , '.' );
@@ -759,7 +759,7 @@ _PyImport_ResolveNameWithPackageContext(const char *name)
759759 }
760760 }
761761#ifndef HAVE_THREAD_LOCAL
762- PyThread_release_lock ( EXTENSIONS .mutex );
762+ PyMutex_Unlock ( & EXTENSIONS .mutex );
763763#endif
764764 return name ;
765765}
@@ -768,12 +768,12 @@ const char *
768768_PyImport_SwapPackageContext (const char * newcontext )
769769{
770770#ifndef HAVE_THREAD_LOCAL
771- PyThread_acquire_lock ( EXTENSIONS .mutex , WAIT_LOCK );
771+ PyMutex_Lock ( & EXTENSIONS .mutex );
772772#endif
773773 const char * oldcontext = PKGCONTEXT ;
774774 PKGCONTEXT = newcontext ;
775775#ifndef HAVE_THREAD_LOCAL
776- PyThread_release_lock ( EXTENSIONS .mutex );
776+ PyMutex_Unlock ( & EXTENSIONS .mutex );
777777#endif
778778 return oldcontext ;
779779}
You can’t perform that action at this time.
0 commit comments