Skip to content

Commit

Permalink
[3.9] bpo-45790: List macros in same order in which fields are descri…
Browse files Browse the repository at this point in the history
…bed (GH-29529) (GH-32321)

Signed-off-by: Rodrigo Tobar <[email protected]>

Co-authored-by: Jelle Zijlstra <[email protected]>.
(cherry picked from commit b275267)

Co-authored-by: rtobar <[email protected]>
  • Loading branch information
JelleZijlstra and rtobar authored Apr 5, 2022
1 parent bc9ec24 commit d1fb16a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/extending/newtypes_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ The first bit is::
This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory
at the start of each object struct and defines a field called ``ob_base``
of type :c:type:`PyObject`, containing a pointer to a type object and a
reference count (these can be accessed using the macros :c:macro:`Py_REFCNT`
and :c:macro:`Py_TYPE` respectively). The reason for the macro is to
reference count (these can be accessed using the macros :c:macro:`Py_TYPE`
and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to
abstract away the layout and to enable additional fields in debug builds.

.. note::
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Adjust inaccurate phrasing in :doc:`../extending/newtypes_tutorial` about the
``ob_base`` field and the macros used to access its contents.

0 comments on commit d1fb16a

Please sign in to comment.