]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
use Py_REFCNT
authorBenjamin Peterson <benjamin@python.org>
Fri, 10 Sep 2010 23:52:42 +0000 (23:52 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 10 Sep 2010 23:52:42 +0000 (23:52 +0000)
Python/ceval.c

index 2c7f57b56a1fa5fb0b165cd83e676bb8d49f124c..51d9fbfb755a390e7fee3b19707c38aa5d3e3e7e 100644 (file)
@@ -4394,7 +4394,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
         return NULL;
     }
 
-    if (v->ob_refcnt == 2) {
+    if (Py_REFCNF(v) == 2) {
         /* In the common case, there are 2 references to the value
          * stored in 'variable' when the += is performed: one on the
          * value stack (in 'v') and one still stored in the
@@ -4435,7 +4435,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
         }
     }
 
-    if (v->ob_refcnt == 1 && !PyUnicode_CHECK_INTERNED(v)) {
+    if (Py_REFCNF(v) == 1 && !PyUnicode_CHECK_INTERNED(v)) {
         /* Now we own the last reference to 'v', so we can resize it
          * in-place.
          */