diff Python/ceval.c @ 64633:e080f11fca19

use Py_REFCNT
author Benjamin Peterson <benjamin@python.org>
date Fri, 10 Sep 2010 23:52:42 +0000
parents 56844b716cd7
children 1764796e9eca
line wrap: on
line diff
--- a/Python/ceval.c	Fri Sep 10 23:50:31 2010 +0000
+++ b/Python/ceval.c	Fri Sep 10 23:52:42 2010 +0000
@@ -4394,7 +4394,7 @@
         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 @@
         }
     }
 
-    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.
          */