summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_global_objects_fini_generated.h2
-rw-r--r--Include/internal/pycore_global_strings.h2
-rw-r--r--Include/internal/pycore_os.h38
-rw-r--r--Include/internal/pycore_runtime.h2
-rw-r--r--Include/internal/pycore_runtime_init.h1
-rw-r--r--Include/internal/pycore_runtime_init_generated.h2
-rw-r--r--Include/internal/pycore_unicodeobject_generated.h4
7 files changed, 51 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_objects_fini_generated.h b/Include/internal/pycore_global_objects_fini_generated.h
index 9951fa9951..6aba2f19eb 100644
--- a/Include/internal/pycore_global_objects_fini_generated.h
+++ b/Include/internal/pycore_global_objects_fini_generated.h
@@ -1051,6 +1051,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(node_offset));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(ns));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(nstype));
+ _PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(nt));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(null));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(number));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(obj));
@@ -1089,6 +1090,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos1));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos2));
+ _PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(posix));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(print_file_and_line));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(priority));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(progress));
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h
index 12144b02f4..acb9a4fbb9 100644
--- a/Include/internal/pycore_global_strings.h
+++ b/Include/internal/pycore_global_strings.h
@@ -537,6 +537,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(node_offset)
STRUCT_FOR_ID(ns)
STRUCT_FOR_ID(nstype)
+ STRUCT_FOR_ID(nt)
STRUCT_FOR_ID(null)
STRUCT_FOR_ID(number)
STRUCT_FOR_ID(obj)
@@ -575,6 +576,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(pos)
STRUCT_FOR_ID(pos1)
STRUCT_FOR_ID(pos2)
+ STRUCT_FOR_ID(posix)
STRUCT_FOR_ID(print_file_and_line)
STRUCT_FOR_ID(priority)
STRUCT_FOR_ID(progress)
diff --git a/Include/internal/pycore_os.h b/Include/internal/pycore_os.h
new file mode 100644
index 0000000000..e4899bd503
--- /dev/null
+++ b/Include/internal/pycore_os.h
@@ -0,0 +1,38 @@
+#ifndef Py_INTERNAL_OS_H
+#define Py_INTERNAL_OS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
+
+#ifndef MS_WINDOWS
+#define _OS_NEED_TICKS_PER_SECOND
+# define need_ticks_per_second_STATE \
+ long ticks_per_second;
+# define need_ticks_per_second_INIT \
+ .ticks_per_second = -1,
+#else
+# define need_ticks_per_second_STATE
+# define need_ticks_per_second_INIT
+#endif /* MS_WINDOWS */
+
+
+struct _os_runtime_state {
+ int _not_used;
+ need_ticks_per_second_STATE
+};
+# define _OS_RUNTIME_INIT \
+ { \
+ ._not_used = 0, \
+ need_ticks_per_second_INIT \
+ }
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTERNAL_OS_H */
diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h
index 0720e2ed44..c6b48cae77 100644
--- a/Include/internal/pycore_runtime.h
+++ b/Include/internal/pycore_runtime.h
@@ -21,6 +21,7 @@ extern "C" {
#include "pycore_pymem.h" // struct _pymem_allocators
#include "pycore_pyhash.h" // struct pyhash_runtime_state
#include "pycore_obmalloc.h" // struct obmalloc_state
+#include "pycore_os.h" // struct _os_runtime_state
#include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids
struct _getargs_runtime_state {
@@ -103,6 +104,7 @@ typedef struct pyruntimestate {
* KeyboardInterrupt exception, suggesting the user pressed ^C. */
int unhandled_keyboard_interrupt;
} signals;
+ struct _os_runtime_state os;
struct pyinterpreters {
PyThread_type_lock mutex;
diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h
index ab53876e35..70263892e5 100644
--- a/Include/internal/pycore_runtime_init.h
+++ b/Include/internal/pycore_runtime_init.h
@@ -26,6 +26,7 @@ extern "C" {
}, \
.obmalloc = _obmalloc_state_INIT(runtime.obmalloc), \
.pyhash_state = pyhash_state_INIT, \
+ .os = _OS_RUNTIME_INIT, \
.interpreters = { \
/* This prevents interpreters from getting created \
until _PyInterpreterState_Enable() is called. */ \
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index 87b0f2ed8d..6d1b8702c7 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -1043,6 +1043,7 @@ extern "C" {
INIT_ID(node_offset), \
INIT_ID(ns), \
INIT_ID(nstype), \
+ INIT_ID(nt), \
INIT_ID(null), \
INIT_ID(number), \
INIT_ID(obj), \
@@ -1081,6 +1082,7 @@ extern "C" {
INIT_ID(pos), \
INIT_ID(pos1), \
INIT_ID(pos2), \
+ INIT_ID(posix), \
INIT_ID(print_file_and_line), \
INIT_ID(priority), \
INIT_ID(progress), \
diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h
index 80be342b5b..7f407c0141 100644
--- a/Include/internal/pycore_unicodeobject_generated.h
+++ b/Include/internal/pycore_unicodeobject_generated.h
@@ -980,6 +980,8 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(nstype);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(nt);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(null);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(number);
@@ -1056,6 +1058,8 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(pos2);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(posix);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(print_file_and_line);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(priority);