File tree Expand file tree Collapse file tree 6 files changed +30
-0
lines changed Expand file tree Collapse file tree 6 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #ifndef Py_INTERNAL_OS_H
2
+ #define Py_INTERNAL_OS_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ #ifndef Py_BUILD_CORE
8
+ # error "this header requires Py_BUILD_CORE define"
9
+ #endif
10
+
11
+
12
+ struct _os_runtime_state {
13
+ int _not_used ;
14
+ };
15
+
16
+ #define _OS_RUNTIME_INIT {0}
17
+
18
+
19
+ #ifdef __cplusplus
20
+ }
21
+ #endif
22
+ #endif /* !Py_INTERNAL_OS_H */
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ extern "C" {
20
20
#include "pycore_pymem.h" // struct _pymem_allocators
21
21
#include "pycore_pyhash.h" // struct pyhash_runtime_state
22
22
#include "pycore_obmalloc.h" // struct obmalloc_state
23
+ #include "pycore_os.h" // struct _os_runtime_state
23
24
#include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids
24
25
25
26
struct _getargs_runtime_state {
@@ -102,6 +103,7 @@ typedef struct pyruntimestate {
102
103
* KeyboardInterrupt exception, suggesting the user pressed ^C. */
103
104
int unhandled_keyboard_interrupt ;
104
105
} signals ;
106
+ struct _os_runtime_state os ;
105
107
106
108
struct pyinterpreters {
107
109
PyThread_type_lock mutex ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ extern "C" {
26
26
}, \
27
27
.obmalloc = _obmalloc_state_INIT(runtime.obmalloc), \
28
28
.pyhash_state = pyhash_state_INIT, \
29
+ .os = _OS_RUNTIME_INIT, \
29
30
.interpreters = { \
30
31
/* This prevents interpreters from getting created \
31
32
until _PyInterpreterState_Enable() is called. */ \
Original file line number Diff line number Diff line change @@ -1654,6 +1654,7 @@ PYTHON_HEADERS= \
1654
1654
$(srcdir)/Include/internal/pycore_object.h \
1655
1655
$(srcdir)/Include/internal/pycore_obmalloc.h \
1656
1656
$(srcdir)/Include/internal/pycore_obmalloc_init.h \
1657
+ $(srcdir)/Include/internal/pycore_os.h \
1657
1658
$(srcdir)/Include/internal/pycore_pathconfig.h \
1658
1659
$(srcdir)/Include/internal/pycore_pyarena.h \
1659
1660
$(srcdir)/Include/internal/pycore_pyerrors.h \
Original file line number Diff line number Diff line change 236
236
<ClInclude Include =" ..\Include\internal\pycore_object.h" />
237
237
<ClInclude Include =" ..\Include\internal\pycore_obmalloc.h" />
238
238
<ClInclude Include =" ..\Include\internal\pycore_obmalloc_init.h" />
239
+ <ClInclude Include =" ..\Include\internal\pycore_os.h" />
239
240
<ClInclude Include =" ..\Include\internal\pycore_pathconfig.h" />
240
241
<ClInclude Include =" ..\Include\internal\pycore_pyarena.h" />
241
242
<ClInclude Include =" ..\Include\internal\pycore_pyerrors.h" />
Original file line number Diff line number Diff line change 612
612
<ClInclude Include =" ..\Include\internal\pycore_obmalloc_init.h" >
613
613
<Filter >Include\internal</Filter >
614
614
</ClInclude >
615
+ <ClInclude Include =" ..\Include\internal\pycore_os.h" >
616
+ <Filter >Include\internal</Filter >
617
+ </ClInclude >
615
618
<ClInclude Include =" ..\Include\internal\pycore_pathconfig.h" >
616
619
<Filter >Include\internal</Filter >
617
620
</ClInclude >
You can’t perform that action at this time.
0 commit comments