diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 07:54:42 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 07:54:42 (GMT) |
| commit | bc5b80bac1d3db5779fcace4922bfc7eb8b964fa (patch) | |
| tree | f2683edb7faa3a850b6a387bdc52166af5525e55 /Modules/socketmodule.c | |
| parent | b16e12aaaa3d6b3f47dc1400e900c2d4aae0f337 (diff) | |
| download | cpython-bc5b80bac1d3db5779fcace4922bfc7eb8b964fa.zip cpython-bc5b80bac1d3db5779fcace4922bfc7eb8b964fa.tar.gz cpython-bc5b80bac1d3db5779fcace4922bfc7eb8b964fa.tar.bz2 | |
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 d9c70f8..bae9634 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) */ |
