We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19c3ac9 commit 7f413a5Copy full SHA for 7f413a5
1 file changed
Objects/unicodeobject.c
@@ -15754,6 +15754,10 @@ PyUnicode_InternInPlace(PyObject **p)
15754
this. */
15755
Py_SET_REFCNT(s, Py_REFCNT(s) - 2);
15756
_PyUnicode_STATE(s).interned = SSTATE_INTERNED_MORTAL;
15757
+#else
15758
+ // PyDict expects that interned strings have their hash
15759
+ // (PyASCIIObject.hash) already computed.
15760
+ (void)unicode_hash(s);
15761
#endif
15762
}
15763
0 commit comments