Skip to content

Commit d411467

Browse files
committed
Fix the doc
Don't use _PyObject_CAST() which doesn't exist in old Python versions.
1 parent cb33989 commit d411467

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Porting to Python 3.11
411411
#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
412412
static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
413413
{ ob->ob_type = type; }
414-
#define Py_SET_TYPE(ob, type) _Py_SET_TYPE(_PyObject_CAST(ob), type)
414+
#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
415415
#endif
416416

417417
(Contributed by Victor Stinner in :issue:`39573`.)

0 commit comments

Comments
 (0)