summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Include
diff options
context:
space:
mode:
authorshadchin <[email protected]>2024-12-23 19:39:02 +0300
committershadchin <[email protected]>2024-12-23 19:54:20 +0300
commit65a5bf9d37a3b29eb394f560b9a09318196c40e8 (patch)
treee5cd68fb0682b2388e52d9806bb87adc348e21a8 /contrib/tools/python3/Include
parenta1dd87a52878ab3e46e5fd2dba5ecbba6113d7e0 (diff)
Update Python 3 to 3.12.8
commit_hash:c20045b8a987d8720e1f3328270357491d5530f3
Diffstat (limited to 'contrib/tools/python3/Include')
-rw-r--r--contrib/tools/python3/Include/internal/pycore_object_state.h8
-rw-r--r--contrib/tools/python3/Include/internal/pycore_runtime_init.h7
-rw-r--r--contrib/tools/python3/Include/internal/pycore_typeobject.h2
-rw-r--r--contrib/tools/python3/Include/internal/pycore_unicodeobject.h3
-rw-r--r--contrib/tools/python3/Include/patchlevel.h4
5 files changed, 14 insertions, 10 deletions
diff --git a/contrib/tools/python3/Include/internal/pycore_object_state.h b/contrib/tools/python3/Include/internal/pycore_object_state.h
index 65feb5af969..6e07b1a01b0 100644
--- a/contrib/tools/python3/Include/internal/pycore_object_state.h
+++ b/contrib/tools/python3/Include/internal/pycore_object_state.h
@@ -24,7 +24,13 @@ struct _py_object_state {
* together via the _ob_prev and _ob_next members of a PyObject, which
* exist only in a Py_TRACE_REFS build.
*/
- PyObject refchain;
+ PyObject *refchain;
+ /* In most cases, refchain points to _refchain_obj.
+ * In sub-interpreters that share objmalloc state with the main interp,
+ * refchain points to the main interpreter's _refchain_obj, and their own
+ * _refchain_obj is unused.
+ */
+ PyObject _refchain_obj;
#endif
int _not_used;
};
diff --git a/contrib/tools/python3/Include/internal/pycore_runtime_init.h b/contrib/tools/python3/Include/internal/pycore_runtime_init.h
index e5f9e17efff..ad90ea680a5 100644
--- a/contrib/tools/python3/Include/internal/pycore_runtime_init.h
+++ b/contrib/tools/python3/Include/internal/pycore_runtime_init.h
@@ -132,15 +132,8 @@ extern PyTypeObject _PyExc_MemoryError;
.context_ver = 1, \
}
-#ifdef Py_TRACE_REFS
-# define _py_object_state_INIT(INTERP) \
- { \
- .refchain = {&INTERP.object_state.refchain, &INTERP.object_state.refchain}, \
- }
-#else
# define _py_object_state_INIT(INTERP) \
{ 0 }
-#endif
// global objects
diff --git a/contrib/tools/python3/Include/internal/pycore_typeobject.h b/contrib/tools/python3/Include/internal/pycore_typeobject.h
index 63f76fc55c9..4fdbc91a1ba 100644
--- a/contrib/tools/python3/Include/internal/pycore_typeobject.h
+++ b/contrib/tools/python3/Include/internal/pycore_typeobject.h
@@ -143,6 +143,8 @@ PyAPI_DATA(PyTypeObject) _PyBufferWrapper_Type;
PyObject *
_PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj, PyObject *name, int *meth_found);
+extern int _PyType_AddMethod(PyTypeObject *, PyMethodDef *);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/tools/python3/Include/internal/pycore_unicodeobject.h b/contrib/tools/python3/Include/internal/pycore_unicodeobject.h
index 44eccdea55b..cecdabe4155 100644
--- a/contrib/tools/python3/Include/internal/pycore_unicodeobject.h
+++ b/contrib/tools/python3/Include/internal/pycore_unicodeobject.h
@@ -76,6 +76,9 @@ struct _Py_unicode_state {
extern void _PyUnicode_ClearInterned(PyInterpreterState *interp);
+// Like PyUnicode_AsUTF8(), but check for embedded null characters.
+extern const char* _PyUnicode_AsUTF8NoNUL(PyObject *);
+
#ifdef __cplusplus
}
diff --git a/contrib/tools/python3/Include/patchlevel.h b/contrib/tools/python3/Include/patchlevel.h
index 4f0c8fb1aa4..6c597837da0 100644
--- a/contrib/tools/python3/Include/patchlevel.h
+++ b/contrib/tools/python3/Include/patchlevel.h
@@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 12
-#define PY_MICRO_VERSION 7
+#define PY_MICRO_VERSION 8
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
-#define PY_VERSION "3.12.7"
+#define PY_VERSION "3.12.8"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.