Commit 4d279c1f authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Typo in bytes.replace(): the buffer interface was always used.

parent 39599dca
......@@ -2594,7 +2594,7 @@ string_replace(PyStringObject *self, PyObject *args)
from_s = PyString_AS_STRING(from);
from_len = PyString_GET_SIZE(from);
}
if (PyUnicode_Check(from))
else if (PyUnicode_Check(from))
return PyUnicode_Replace((PyObject *)self,
from, to, count);
else if (PyObject_AsCharBuffer(from, &from_s, &from_len))
......
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