Skip to content

Commit 063392b

Browse files
committed
gh-106320: Remove private _PyOS_IsMainThread() function
Move the following private API to the internal C API (pycore_signal.h): * _PyOS_IsMainThread() * _PyOS_SigintEvent() No longer export these functions.
1 parent 15c5a50 commit 063392b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Include/internal/pycore_signal.h

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

9797

98+
extern int _PyOS_IsMainThread(void);
99+
100+
#ifdef MS_WINDOWS
101+
/* windows.h is not included by Python.h so use void* instead of HANDLE */
102+
extern void* _PyOS_SigintEvent(void);
103+
#endif
104+
98105
#ifdef __cplusplus
99106
}
100107
#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
#ifdef HAVE_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-
#ifndef Py_LIMITED_API
19-
PyAPI_FUNC(int) _PyOS_IsMainThread(void);
20-
21-
#ifdef MS_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)