summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-04 18:04:52 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-04 18:04:52 (GMT)
commit6b56a7fd3d3ef1ceb6d97d3dad5409c40723011b (patch)
treeae50cea3bca315d7d1e3ee7681e3de9847939eeb /Objects
parent5f99c912c8721d1b8da54d371ff826c46262e944 (diff)
downloadcpython-6b56a7fd3d3ef1ceb6d97d3dad5409c40723011b.zip
cpython-6b56a7fd3d3ef1ceb6d97d3dad5409c40723011b.tar.gz
cpython-6b56a7fd3d3ef1ceb6d97d3dad5409c40723011b.tar.bz2
Add assertion to _Py_ReleaseInternedUnicodeStrings() if READY fails
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index a958951..3299901 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -13131,7 +13131,7 @@ PyUnicode_InternInPlace(PyObject **p)
if (PyUnicode_CHECK_INTERNED(s))
return;
if (_PyUnicode_READY_REPLACE(p)) {
- assert(0 && "PyUnicode_READY fail in PyUnicode_InternInPlace");
+ assert(0 && "_PyUnicode_READY_REPLACE fail in PyUnicode_InternInPlace");
return;
}
s = (PyUnicodeObject *)(*p);
@@ -13217,8 +13217,10 @@ _Py_ReleaseInternedUnicodeStrings(void)
n);
for (i = 0; i < n; i++) {
s = (PyUnicodeObject *) PyList_GET_ITEM(keys, i);
- if (PyUnicode_READY(s) == -1)
+ if (PyUnicode_READY(s) == -1) {
+ assert(0 && "could not ready string");
fprintf(stderr, "could not ready string\n");
+ }
switch (PyUnicode_CHECK_INTERNED(s)) {
case SSTATE_NOT_INTERNED:
/* XXX Shouldn't happen */