Commit 74203e68 authored by Victor Stinner's avatar Victor Stinner

PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown

parent eb62a909
......@@ -1211,7 +1211,7 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
case PyUnicode_4BYTE_KIND:
return _PyUnicode_FromUCS4(buffer, size);
}
assert(0);
PyErr_SetString(PyExc_ValueError, "invalid kind");
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment