Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0de25d

Browse files
committed
use Py_REFCNT
1 parent 6f7b783 commit d0de25d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/ceval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4394,7 +4394,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
43944394
return NULL;
43954395
}
43964396

4397-
if (v->ob_refcnt == 2) {
4397+
if (Py_REFCNF(v) == 2) {
43984398
/* In the common case, there are 2 references to the value
43994399
* stored in 'variable' when the += is performed: one on the
44004400
* value stack (in 'v') and one still stored in the
@@ -4435,7 +4435,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
44354435
}
44364436
}
44374437

4438-
if (v->ob_refcnt == 1 && !PyUnicode_CHECK_INTERNED(v)) {
4438+
if (Py_REFCNF(v) == 1 && !PyUnicode_CHECK_INTERNED(v)) {
44394439
/* Now we own the last reference to 'v', so we can resize it
44404440
* in-place.
44414441
*/

0 commit comments

Comments
 (0)