Close #24784: Fix compilation without thread support · pythoncapi/cpython@bc5b80b · GitHub
Skip to content

Commit bc5b80b

Browse files
committed
Close python#24784: Fix compilation without thread support
Add "#ifdef WITH_THREAD" around cals to: * PyGILState_Check() * _PyImport_AcquireLock() * _PyImport_ReleaseLock()
1 parent b16e12a commit bc5b80b

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

Modules/_posixsubprocess.c

Lines changed: 10 additions & 2 deletions

Modules/socketmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,10 @@ sock_call_ex(PySocketSockObject *s,
719719
int deadline_initialized = 0;
720720
int res;
721721

722+
#ifdef WITH_THREAD
722723
/* sock_call() must be called with the GIL held. */
723724
assert(PyGILState_Check());
725+
#endif
724726

725727
/* outer loop to retry select() when select() is interrupted by a signal
726728
or to retry select()+sock_func() on false positive (see above) */

Python/fileutils.c

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)