mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
use Py_REFCNT
This commit is contained in:
parent
6f7b783cde
commit
d0de25d731
1 changed files with 2 additions and 2 deletions
|
@ -4394,7 +4394,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->ob_refcnt == 2) {
|
if (Py_REFCNF(v) == 2) {
|
||||||
/* In the common case, there are 2 references to the value
|
/* In the common case, there are 2 references to the value
|
||||||
* stored in 'variable' when the += is performed: one on the
|
* stored in 'variable' when the += is performed: one on the
|
||||||
* value stack (in 'v') and one still stored in 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
|
/* Now we own the last reference to 'v', so we can resize it
|
||||||
* in-place.
|
* in-place.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue