Fix PyUnicode_InternImmortal(): PyUnicode_InternInPlace() may changes *p
This commit is contained in:
parent
9faa384bed
commit
af9e4b8c29
@ -14001,11 +14001,9 @@ PyUnicode_InternInPlace(PyObject **p)
|
|||||||
void
|
void
|
||||||
PyUnicode_InternImmortal(PyObject **p)
|
PyUnicode_InternImmortal(PyObject **p)
|
||||||
{
|
{
|
||||||
PyUnicodeObject *u = (PyUnicodeObject *)*p;
|
|
||||||
|
|
||||||
PyUnicode_InternInPlace(p);
|
PyUnicode_InternInPlace(p);
|
||||||
if (PyUnicode_CHECK_INTERNED(*p) != SSTATE_INTERNED_IMMORTAL) {
|
if (PyUnicode_CHECK_INTERNED(*p) != SSTATE_INTERNED_IMMORTAL) {
|
||||||
_PyUnicode_STATE(u).interned = SSTATE_INTERNED_IMMORTAL;
|
_PyUnicode_STATE(*p).interned = SSTATE_INTERNED_IMMORTAL;
|
||||||
Py_INCREF(*p);
|
Py_INCREF(*p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user