https://github.com/python/cpython/commit/95c03d018df5f1e287a4577669b1ced5bc5518f8 commit: 95c03d018df5f1e287a4577669b1ced5bc5518f8 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: vstinner <[email protected]> date: 2025-10-15T15:02:03Z summary:
[3.14] gh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (GH-140158) (#140164) gh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (GH-140158) (cherry picked from commit 728d239e57b650c392517b7ae569b0eb05af826e) Co-authored-by: Victor Stinner <[email protected]> files: A Misc/NEWS.d/next/C_API/2025-10-15-15-59-59.gh-issue-140153.BO7sH4.rst M Include/refcount.h diff --git a/Include/refcount.h b/Include/refcount.h index 1ecba5ee78d685..1ef6b2186bba03 100644 --- a/Include/refcount.h +++ b/Include/refcount.h @@ -117,6 +117,8 @@ PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob); } #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 # define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob)) + #else + # define Py_REFCNT(ob) _Py_REFCNT(ob) #endif #endif diff --git a/Misc/NEWS.d/next/C_API/2025-10-15-15-59-59.gh-issue-140153.BO7sH4.rst b/Misc/NEWS.d/next/C_API/2025-10-15-15-59-59.gh-issue-140153.BO7sH4.rst new file mode 100644 index 00000000000000..502c48b6842d1c --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2025-10-15-15-59-59.gh-issue-140153.BO7sH4.rst @@ -0,0 +1,2 @@ +Fix :c:func:`Py_REFCNT` definition on limited C API 3.11-3.13. Patch by +Victor Stinner. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
