summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fd0e8e0..f32ab41 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -15754,6 +15754,10 @@ PyUnicode_InternInPlace(PyObject **p)
this. */
Py_SET_REFCNT(s, Py_REFCNT(s) - 2);
_PyUnicode_STATE(s).interned = SSTATE_INTERNED_MORTAL;
+#else
+ // PyDict expects that interned strings have their hash
+ // (PyASCIIObject.hash) already computed.
+ (void)unicode_hash(s);
#endif
}