8000 gh-81057: Move Signal-Related Globals to _PyRuntimeState by ericsnowcurrently · Pull Request #100085 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-81057: Move Signal-Related Globals to _PyRuntimeState #100085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6dcffac
Add struct _signals_runtime_state.
ericsnowcurrently Dec 6, 2022
5e49464
Move signalmodule.c:Handlers to _PyRuntimeState.
ericsnowcurrently Dec 6, 2022
07332af
Move signalmodule.c:wakeup to _PyRuntimeState.
ericsnowcurrently Dec 6, 2022
1b5ec60
Move signalmodule.c:is_tripped to _PyRuntimeState.
ericsnowcurrently Dec 6, 2022
280f6f4
Move signalmodule.c:signal_global_state to _PyRuntimeState.
ericsnowcurrently Dec 7, 2022
fd6a2de
Fix includes (e.g. for Windows) in pycore_signal.h.
ericsnowcurrently Dec 8, 2022
410190b
Drop the socketmodule.h include.
ericsnowcurrently Dec 8, 2022
1fc3dce
Fix the include for SOCKET on Windows.
ericsnowcurrently Dec 8, 2022
d4f05e4
Fix formatting.
ericsnowcurrently Dec 8, 2022
1ddece1
Fix order of includes on WINDOWS.
ericsnowcurrently Dec 8, 2022
9592a8b
Fix includes on Windows.
ericsnowcurrently Dec 9, 2022
cc43787
Fix INVALID_FD on Windows.
ericsnowcurrently Dec 9, 2022
0164014
Revert "Fix includes on Windows."
ericsnowcurrently Dec 9, 2022
1d8d9e2
Include the headers conditionally.
ericsnowcurrently Dec 9, 2022
555f727
Fail instead of falling back to includes.
ericsnowcurrently Dec 9, 2022
57dc4a8
Reach for a sweet spot.
ericsnowcurrently Dec 10, 2022
08799ad
Pull in HANDLE.
ericsnowcurrently Dec 10, 2022
3bad4d6
Drop an unnecessary ifdef.
ericsnowcurrently Dec 12, 2022
3624161
Force the ifdef checks for the actual definition of _PyRuntime.
ericsnowcurrently Dec 12, 2022
2191c97
Drop the ifdef checks.
ericsnowcurrently Dec 12, 2022
76794fb
Change members/macros to fail (or warn) when used without the proper …
ericsnowcurrently Dec 12, 2022
c9aee62
Make sure the Windows includes happen early enough.
ericsnowcurrently Dec 12, 2022
ca33ad7
Move the includes up.
ericsnowcurrently Dec 12, 2022
7f35360
Check for _WINSOCKAPI_ instead of SOCKET.
ericsnowcurrently Dec 12, 2022
3d23778
Define a HANDLE macro where needed.
ericsnowcurrently Dec 12, 2022
73e3bc1
Use void* for the "fd" field.
ericsnowcurrently Dec 12, 2022
4195e62
Use void* for the "sigint_event" field.
ericsnowcurrently Dec 12, 2022
36cda7b
Use an int for wakeup.fd, instead of SOCKET.
ericsnowcurrently Dec 12, 2022
2a3bdf1
Drop the explicit includes.
ericsnowcurrently Dec 12, 2022
38596a0
Fix a warning.
ericsnowcurrently Dec 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fail instead of falling back to includes.
  • Loading branch information
ericsnowcurrently committed Dec 12, 2022
commit 555f727dec509da3c98e9a85a7e8a6f70e56aa1e
4 changes: 2 additions & 2 deletions Include/internal/pycore_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ extern "C" {

#ifdef MS_WINDOWS
# ifndef SOCKET
# include <winsock2.h> // SOCKET
# error "<winsock2.h> must be included before this header"
# endif
# ifndef HANDLE
# include <windows.h> // HANDLE
# error "<windows.h> must be included before this header"
# endif
#endif
#include <signal.h> // NSIG
Expand Down
3 changes: 2 additions & 1 deletion Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "pycore_moduleobject.h" // _PyModule_GetState()
#include "pycore_pyerrors.h" // _PyErr_SetString()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_signal.h" // Py_NSIG

#ifndef MS_WINDOWS
# include "posixmodule.h"
Expand All @@ -29,6 +28,8 @@
# endif
#endif

#include "pycore_signal.h" // Py_NSIG

#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
Expand Down
0