Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb8ff9df

Browse files
Pull in HANDLE.
1 parent391c0e2 commitb8ff9df

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

‎Include/internal/pycore_signal.h‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ extern "C" {
1313
#include"pycore_atomic.h"// _Py_atomic_address
1414

1515
#ifdefMS_WINDOWS
16-
#ifndefSOCKET
17-
#ifdefPYCORE_SIGNAL_REQUIRES_WINSOCK
16+
#ifdefPYCORE_SIGNAL_WITH_PRE_INCLUDES
17+
#ifndefSOCKET
1818
# error "<winsock2.h> must be included before this header"
1919
# endif
20-
#endif
21-
#ifndefHANDLE
22-
#error "<windows.h> must be included before this header"
20+
# ifndefHANDLE
21+
# error "<windows.h> must be included before this header"
22+
#endif
2323
# endif
2424
#endif
2525
#include<signal.h>// NSIG
@@ -62,7 +62,8 @@ struct _signals_runtime_state {
6262
# ifdefSOCKET
6363
SOCKETfd;
6464
# else
65-
// <winsock2.h> wasn't included already, so we fake it.
65+
// <winsock2.h> wasn't included already,
66+
// we use something compatible with SOCKET.
6667
intfd;
6768
# endif
6869
#elif defined(__VXWORKS__)
@@ -84,7 +85,13 @@ struct _signals_runtime_state {
8485
PyObject*default_handler;
8586
PyObject*ignore_handler;
8687
#ifdefMS_WINDOWS
88+
# ifdefHANDLE
8789
HANDLEsigint_event;
90+
# else
91+
// <windows.h> wasn't included already,
92+
// we use something compatible with HANDLE.
93+
void*sigint_event;
94+
# endif
8895
#endif
8996

9097
/* True if the main interpreter thread exited due to an unhandled

‎Modules/signalmodule.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#ifdefMS_WINDOWS
77
# if !defined(SOCKET)&& defined(Py_INTERNAL_SIGNAL_H)
8-
# error "pycore_signal.h included withoutPYCORE_SIGNAL_REQUIRES_WINSOCK"
8+
# error "pycore_signal.h included withoutPYCORE_SIGNAL_WITH_PRE_INCLUDES"
99
# endif
10-
# define_PYCORE_SIGNAL_REQUIRES_WINSOCK
10+
# definePYCORE_SIGNAL_WITH_PRE_INCLUDES
1111
#endif
1212

1313
#include"Python.h"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp