Skip to content

Commit 8e9637a

Browse files
committed
bpo-39573: Update docs
1 parent 21dd58e commit 8e9637a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Doc/c-api/structures.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ the definition of all other Python objects.
6868
6969
.. versionchanged:: 3.10
7070
:c:func:`Py_TYPE()` is changed to the inline static function.
71+
Use :c:func:`Py_SET_TYPE()` to set an object type.
7172
7273
7374
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)

Doc/whatsnew/3.10.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Optimizations
9191
=============
9292

9393

94-
Build and C API Changes
95-
=======================
94+
Build Changes
95+
=============
9696

9797

9898

@@ -105,11 +105,12 @@ Removed
105105
=======
106106

107107

108+
C API Changes
109+
=============
108110

109111
Porting to Python 3.10
110-
======================
111-
112-
This section lists previously described changes and other bugfixes
113-
that may require changes to your code.
114-
112+
----------------------
115113

114+
* Since :c:func:`Py_TYPE()` is changed to the inline static function,
115+
``Py_TYPE(obj) = new_type`` should be ported to use :c:func:`Py_SET_TYPE()`.
116+
(Contributed by Dong-hee Na in :issue:`39573`.)

0 commit comments

Comments
 (0)