Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Fix formatting for PyObject opaqueness section
  • Loading branch information
clin1234 authored Apr 12, 2026
commit e8bdfc6fbab0bcb9a7b6cccc9280ec7b6c35f5ac
8 changes: 4 additions & 4 deletions Doc/howto/freethreading-stable-abi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
can be used to determine whether the current running interpreter had the
macro defined.

`PyObject` opaqueness
``PyObject`` opaqueness
=====================

Check warning on line 33 in Doc/howto/freethreading-stable-abi.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

Title underline too short.

Check warning on line 33 in Doc/howto/freethreading-stable-abi.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

Title underline too short.

Accessing any member of `PyObject` is now prohibited, like the non-GIL
stable ABI. For instance, prefer `Py_Type()` and `Py_SET_TYPE()` over manipulating `ob_type` directly,
`Py_REFCNT`, `Py_INCREF()` and `Py_DecRef().` over `ob_refcnt`, etc.
Accessing any member of ``PyObject`` directly is now prohibited, like the non-GIL
stable ABI. For instance, prefer ``Py_Type()`` and ``Py_SET_TYPE()`` over ``ob_type``,
Comment thread
clin1234 marked this conversation as resolved.
Outdated
``Py_REFCNT``, ``Py_INCREF()`` and ``Py_DecRef()`` over ``ob_refcnt``, etc.
Comment thread
clin1234 marked this conversation as resolved.
Outdated

Module Initialization
=====================
Expand Down Expand Up @@ -129,7 +129,7 @@
.. _PyDict_Next:

``PyDict_Next``
'''''''''''''''

Check warning on line 132 in Doc/howto/freethreading-stable-abi.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

duplicate label pydict_next, other instance in /home/runner/work/cpython/cpython/Doc/howto/free-threading-extensions.rst

A notable exception is :c:func:`PyDict_Next`, which does not lock the
dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect
Expand Down Expand Up @@ -200,7 +200,7 @@
.. _free-threaded-memory-allocation:

Memory Allocation APIs
======================

Check warning on line 203 in Doc/howto/freethreading-stable-abi.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

duplicate label free-threaded-memory-allocation, other instance in /home/runner/work/cpython/cpython/Doc/howto/free-threading-extensions.rst

Python's memory management C API provides functions in three different
:ref:`allocation domains <allocator-domains>`: "raw", "mem", and "object".
Expand Down Expand Up @@ -392,7 +392,7 @@
.. _per-object-locks:

Per-Object Locks (``ob_mutex``)
...............................

Check warning on line 395 in Doc/howto/freethreading-stable-abi.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

duplicate label per-object-locks, other instance in /home/runner/work/cpython/cpython/Doc/howto/free-threading-extensions.rst

In the free-threaded build, each Python object contains a :c:member:`~PyObject.ob_mutex`
Comment thread
clin1234 marked this conversation as resolved.
Outdated
field of type :c:type:`PyMutex`. This mutex is **reserved for use by the
Expand Down
Loading