Skip to content

Commit 0a8ba2d

Browse files
committed
Repeat "protection" in the documentation
1 parent f7e348b commit 0a8ba2d

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

Doc/c-api/init.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,8 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
13681368
13691369
.. c:function:: int PyUnstable_ThreadState_SetStackProtection(PyThreadState *tstate, void *stack_start_addr, size_t stack_size)
13701370
1371-
Set the stack start address and stack size of a Python thread state.
1371+
Set the stack protection start address and stack protection size
1372+
of a Python thread state.
13721373
13731374
On success, return ``0``.
13741375
On failure, set an exception and return ``-1``.
@@ -1394,8 +1395,8 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
13941395
13951396
.. c:function:: void PyUnstable_ThreadState_ResetStackProtection(PyThreadState *tstate)
13961397
1397-
Reset the stack start address and stack size of a Python thread state to
1398-
the operating system defaults.
1398+
Reset the stack protection start address and stack protection size
1399+
of a Python thread state to the operating system defaults.
13991400
14001401
See :c:func:`PyUnstable_ThreadState_SetStackProtection` for an explanation.
14011402

Doc/whatsnew/3.14.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,11 +2995,6 @@ New features in the C API
29952995
as arguments to C API functions.
29962996
(Contributed by Sam Gross in :gh:`133164`.)
29972997

2998-
* Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and
2999-
:c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack base
3000-
address and stack size of a Python thread state.
3001-
(Contributed by Victor Stinner in :gh:`139653`.)
3002-
30032998

30042999
Limited C API changes
30053000
---------------------

Doc/whatsnew/3.15.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,12 @@ New features
950950
* Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array.
951951
(Contributed by Victor Stinner in :gh:`111489`.)
952952

953+
* Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and
954+
:c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set
955+
the stack protection base address and stack protection size of a Python
956+
thread state.
957+
(Contributed by Victor Stinner in :gh:`139653`.)
958+
953959

954960
Changed C APIs
955961
--------------

Include/cpython/pystate.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,15 @@ PyAPI_FUNC(int) PyGILState_Check(void);
276276
*/
277277
PyAPI_FUNC(PyObject*) _PyThread_CurrentFrames(void);
278278

279-
// Set the stack start address and stack size of a Python thread state
279+
// Set the stack protection start address and stack protection size
280+
// of a Python thread state
280281
PyAPI_FUNC(int) PyUnstable_ThreadState_SetStackProtection(
281282
PyThreadState *tstate,
282283
void *stack_start_addr, // Stack start address
283284
size_t stack_size); // Stack size (in bytes)
284285

285-
// Reset the stack start address and stack size of a Python thread state
286+
// Reset the stack protection start address and stack protection size
287+
// of a Python thread state
286288
PyAPI_FUNC(void) PyUnstable_ThreadState_ResetStackProtection(
287289
PyThreadState *tstate);
288290

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and
2-
:c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack base
3-
address and stack size of a Python thread state. Patch by Victor Stinner.
2+
:c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the
3+
stack protection base address and stack protection size of a Python thread
4+
state. Patch by Victor Stinner.

0 commit comments

Comments
 (0)