From 4d279c1f80428c094cd5e5fbd1491f16fda177bf Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 22 Nov 2007 02:55:35 +0000 Subject: Typo in bytes.replace(): the buffer interface was always used. --- Objects/stringobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index d341436..d135991 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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)) -- cgit v0.12