mirror of https://github.com/python/cpython.git
PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown
This commit is contained in:
parent
1d30db459d
commit
202b62bd90
|
@ -1211,7 +1211,7 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
|
||||||
case PyUnicode_4BYTE_KIND:
|
case PyUnicode_4BYTE_KIND:
|
||||||
return _PyUnicode_FromUCS4(buffer, size);
|
return _PyUnicode_FromUCS4(buffer, size);
|
||||||
}
|
}
|
||||||
assert(0);
|
PyErr_SetString(PyExc_ValueError, "invalid kind");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue