mirror of
https://github.com/python/cpython.git
synced 2025-07-17 00:05:20 +00:00
bpo-40881: Fix unicode_release_interned() (GH-20699)
Use Py_SET_REFCNT() in unicode_release_interned().
This commit is contained in:
parent
7907f8cbc6
commit
c96a61e816
1 changed files with 2 additions and 2 deletions
|
@ -15669,13 +15669,13 @@ unicode_release_interned(void)
|
|||
}
|
||||
switch (PyUnicode_CHECK_INTERNED(s)) {
|
||||
case SSTATE_INTERNED_IMMORTAL:
|
||||
Py_REFCNT(s) += 1;
|
||||
Py_SET_REFCNT(s, Py_REFCNT(s) + 1);
|
||||
#ifdef INTERNED_STATS
|
||||
immortal_size += PyUnicode_GET_LENGTH(s);
|
||||
#endif
|
||||
break;
|
||||
case SSTATE_INTERNED_MORTAL:
|
||||
Py_REFCNT(s) += 2;
|
||||
Py_SET_REFCNT(s, Py_REFCNT(s) + 2);
|
||||
#ifdef INTERNED_STATS
|
||||
mortal_size += PyUnicode_GET_LENGTH(s);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue