Commit ff9e50fd authored by Victor Stinner's avatar Victor Stinner

Oops, fix Py_MIN/Py_MAX case

parent 17222160
...@@ -622,7 +622,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start, ...@@ -622,7 +622,7 @@ PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start,
if (PyUnicode_READY(to)) if (PyUnicode_READY(to))
return -1; return -1;
how_many = PY_MIN(PyUnicode_GET_LENGTH(from), how_many); how_many = Py_MIN(PyUnicode_GET_LENGTH(from), how_many);
if (to_start + how_many > PyUnicode_GET_LENGTH(to)) { if (to_start + how_many > PyUnicode_GET_LENGTH(to)) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"Cannot write %zi characters at %zi " "Cannot write %zi characters at %zi "
...@@ -9472,7 +9472,7 @@ PyUnicode_Concat(PyObject *left, PyObject *right) ...@@ -9472,7 +9472,7 @@ PyUnicode_Concat(PyObject *left, PyObject *right)
goto onError; goto onError;
maxchar = PyUnicode_MAX_CHAR_VALUE(u); maxchar = PyUnicode_MAX_CHAR_VALUE(u);
maxchar = PY_MAX(maxchar, PyUnicode_MAX_CHAR_VALUE(v)); maxchar = Py_MAX(maxchar, PyUnicode_MAX_CHAR_VALUE(v));
/* Concat the two Unicode strings */ /* Concat the two Unicode strings */
w = PyUnicode_New( w = PyUnicode_New(
......
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