summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-06 23:38:59 (GMT)
committerGitHub <noreply@github.com>2020-02-06 23:38:59 (GMT)
commita93c51e3a8e15f1a486d11d5b55a64f3381babe0 (patch)
treea84997f6ca55cb27c92248dc04eda44e01a07a2a /Objects/tupleobject.c
parent446463f8dbce0556be8020914f37089b63bb8ab6 (diff)
downloadcpython-a93c51e3a8e15f1a486d11d5b55a64f3381babe0.zip
cpython-a93c51e3a8e15f1a486d11d5b55a64f3381babe0.tar.gz
cpython-a93c51e3a8e15f1a486d11d5b55a64f3381babe0.tar.bz2
bpo-39573: Use Py_REFCNT() macro (GH-18388)
Replace direct acccess to PyObject.ob_refcnt with usage of the Py_REFCNT() macro.
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 8c8c66f..d114bd6 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -153,7 +153,7 @@ int
PyTuple_SetItem(PyObject *op, Py_ssize_t i, PyObject *newitem)
{
PyObject **p;
- if (!PyTuple_Check(op) || op->ob_refcnt != 1) {
+ if (!PyTuple_Check(op) || Py_REFCNT(op) != 1) {
Py_XDECREF(newitem);
PyErr_BadInternalCall();
return -1;