Accept Unicode legacy strings in the Decimal constructor.

This commit is contained in:
Stefan Krah 2012-11-10 23:09:04 +01:00
parent 6b0bdab429
commit 6e467049c6
2 changed files with 13 additions and 2 deletions

View file

@ -1892,7 +1892,9 @@ numeric_as_ascii(const PyObject *u, int strip_ws)
Py_ssize_t j, len;
int d;
assert(PyUnicode_IS_READY(u));
if (PyUnicode_READY(u) == -1) {
return NULL;
}
kind = PyUnicode_KIND(u);
data = PyUnicode_DATA(u);