Skip to content

Commit 95c03d0

Browse files
[3.14] pythongh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (pythonGH-140158) (python#140164)
pythongh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (pythonGH-140158) (cherry picked from commit 728d239) Co-authored-by: Victor Stinner <[email protected]>
1 parent 045e349 commit 95c03d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Include/refcount.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob);
117117
}
118118
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
119119
# define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob))
120+
#else
121+
# define Py_REFCNT(ob) _Py_REFCNT(ob)
120122
#endif
121123
#endif
122124

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix :c:func:`Py_REFCNT` definition on limited C API 3.11-3.13. Patch by
2+
Victor Stinner.

0 commit comments

Comments
 (0)