diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 09:54:42 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 09:54:42 +0200 |
commit | bc5b80bac1d3db5779fcace4922bfc7eb8b964fa (patch) | |
tree | f2683edb7faa3a850b6a387bdc52166af5525e55 /Modules/socketmodule.c | |
parent | b16e12aaaa3d6b3f47dc1400e900c2d4aae0f337 (diff) | |
download | cpython-git-bc5b80bac1d3db5779fcace4922bfc7eb8b964fa.tar.gz |
Close #24784: Fix compilation without thread support
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index d9c70f8665..bae9634ef2 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -719,8 +719,10 @@ sock_call_ex(PySocketSockObject *s, int deadline_initialized = 0; int res; +#ifdef WITH_THREAD /* sock_call() must be called with the GIL held. */ assert(PyGILState_Check()); +#endif /* outer loop to retry select() when select() is interrupted by a signal or to retry select()+sock_func() on false positive (see above) */ |