mirror of
https://github.com/python/cpython.git
synced 2025-08-26 03:34:43 +00:00
gh-110481: Implement biased reference counting (gh-110764)
This commit is contained in:
parent
05f2f0ac92
commit
6dfb8fe023
29 changed files with 511 additions and 52 deletions
|
@ -14967,7 +14967,7 @@ _PyUnicode_ClearInterned(PyInterpreterState *interp)
|
|||
// Skip the Immortal Instance check and restore
|
||||
// the two references (key and value) ignored
|
||||
// by PyUnicode_InternInPlace().
|
||||
s->ob_refcnt = 2;
|
||||
_Py_SetMortal(s, 2);
|
||||
#ifdef INTERNED_STATS
|
||||
total_length += PyUnicode_GET_LENGTH(s);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue