and check the string consistency.
_PyUnicode_CheckConsistency() doesn't check the hash anymore. It should be
possible to call this function even if hash(str) was already called.
if (v == NULL)
return PyUnicode_FromString("<NULL>");
if (PyUnicode_CheckExact(v)) {
+ if (PyUnicode_READY(v) < 0)
+ return NULL;
Py_INCREF(v);
return v;
}
Py_DECREF(res);
return NULL;
}
+ if (PyUnicode_READY(res) < 0)
+ return NULL;
+ assert(_PyUnicode_CheckConsistency(res, 1));
return res;
}
assert(maxchar <= 0x10FFFF);
}
}
- if (check_content && !unicode_is_singleton(op))
- assert(ascii->hash == -1);
return 1;
}
#endif