File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ Python 3.15
7070
7171 On PyPy, always returns ``-1``.
7272
73+ .. c:function:: int PyUnstable_SetImmortal(PyObject *op)
74+
75+ See `PyUnstable_SetImmortal() documentation <https://docs.python.org/dev/c-api/object.html#c.PyUnstable_SetImmortal>`__.
76+
7377
7478Python 3.14
7579-----------
Original file line number Diff line number Diff line change 11Changelog
22=========
33
4+ * 2026-02-12: Add functions:
5+
6+ * ``PyUnstable_SetImmortal() ``
7+
48* 2025-10-14: Add functions:
59
610 * ``PyTuple_FromArray() ``
Original file line number Diff line number Diff line change @@ -2660,6 +2660,10 @@ PyUnstable_Unicode_GET_CACHED_HASH(PyObject *op)
26602660#endif
26612661
26622662#if 0x030E0000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030F00A7 && !defined(PYPY_VERSION)
2663+ // Immortal objects were implemented in Python 3.12, however there is no easy API
2664+ // to make objects immortal until 3.14 which has _Py_SetImmortal(). Since
2665+ // immortal objects are primarily needed for free-threading, this API is implemented
2666+ // for 3.14 and above.
26632667extern void _Py_SetImmortal (PyObject *op);
26642668static inline int
26652669PyUnstable_SetImmortal (PyObject *op)
You can’t perform that action at this time.
0 commit comments