summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-19 17:47:02 (GMT)
committerGitHub <noreply@github.com>2017-03-19 17:47:02 (GMT)
commit6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae (patch)
treec329a3e6c42184db981af527867990e19996a0f0 /Objects
parent004e03fb0c2febe2ec8afbd28ffcb3e980c63228 (diff)
downloadcpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.zip
cpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.tar.gz
cpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.tar.bz2
bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c2
-rw-r--r--Objects/bytesobject.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 3a80b73..fe322d2 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -254,7 +254,7 @@ PyByteArray_Concat(PyObject *a, PyObject *b)
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
- Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
+ Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 1050a93..bde7948 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -1438,7 +1438,7 @@ bytes_concat(PyObject *a, PyObject *b)
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
- Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
+ Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}