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

Commitfadc2dc

Browse files
authored
gh-106320: Remove private _PyOS_IsMainThread() function (#108605)
Move the following private API to the internal C API(pycore_signal.h): _PyOS_IsMainThread() and _PyOS_SigintEvent().
1 parentc9eefc7 commitfadc2dc

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

‎Include/internal/pycore_signal.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ struct _signals_runtime_state {
9595
}
9696

9797

98+
// Export for '_multiprocessing' shared extension
99+
PyAPI_FUNC(int)_PyOS_IsMainThread(void);
100+
101+
#ifdefMS_WINDOWS
102+
// <windows.h> is not included by Python.h so use void* instead of HANDLE.
103+
// Export for '_multiprocessing' shared extension
104+
PyAPI_FUNC(void*)_PyOS_SigintEvent(void);
105+
#endif
106+
98107
#ifdef__cplusplus
99108
}
100109
#endif

‎Include/intrcheck.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,18 @@ extern "C" {
55
#endif
66

77
PyAPI_FUNC(int)PyOS_InterruptOccurred(void);
8+
89
#ifdefHAVE_FORK
910
#if !defined(Py_LIMITED_API)||Py_LIMITED_API+0 >=0x03070000
1011
PyAPI_FUNC(void)PyOS_BeforeFork(void);
1112
PyAPI_FUNC(void)PyOS_AfterFork_Parent(void);
1213
PyAPI_FUNC(void)PyOS_AfterFork_Child(void);
1314
#endif
1415
#endif
16+
1517
/* Deprecated, please use PyOS_AfterFork_Child() instead */
1618
Py_DEPRECATED(3.7)PyAPI_FUNC(void)PyOS_AfterFork(void);
1719

18-
#ifndefPy_LIMITED_API
19-
PyAPI_FUNC(int)_PyOS_IsMainThread(void);
20-
21-
#ifdefMS_WINDOWS
22-
/* windows.h is not included by Python.h so use void* instead of HANDLE */
23-
PyAPI_FUNC(void*)_PyOS_SigintEvent(void);
24-
#endif
25-
#endif/* !Py_LIMITED_API */
26-
2720
#ifdef__cplusplus
2821
}
2922
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp