summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-04-15 22:20:47 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-04-15 22:20:47 (GMT)
commit43de36d2c7a6138a47371cbe9411d3dd8026e5a4 (patch)
tree797fc12e6dc90924b6b5e6867662db9ccd0bc5aa /Objects
parent1f8a1cc0f716d9e112ce1cc0a8552f481c51f7be (diff)
downloadcpython-43de36d2c7a6138a47371cbe9411d3dd8026e5a4.zip
cpython-43de36d2c7a6138a47371cbe9411d3dd8026e5a4.tar.gz
cpython-43de36d2c7a6138a47371cbe9411d3dd8026e5a4.tar.bz2
Issue #26766: Remove redundant bytearray_format() from bytearrayobject.c
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 7748859..de7fb1e 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -279,19 +279,6 @@ PyByteArray_Concat(PyObject *a, PyObject *b)
return (PyObject *)result;
}
-static PyObject *
-bytearray_format(PyByteArrayObject *self, PyObject *args)
-{
- if (self == NULL || !PyByteArray_Check(self)) {
- PyErr_BadInternalCall();
- return NULL;
- }
-
- return _PyBytes_FormatEx(PyByteArray_AS_STRING(self),
- PyByteArray_GET_SIZE(self),
- args, 1);
-}
-
/* Functions stuffed into the type object */
static Py_ssize_t
@@ -3014,7 +3001,7 @@ bytearray_mod(PyObject *v, PyObject *w)
{
if (!PyByteArray_Check(v))
Py_RETURN_NOTIMPLEMENTED;
- return bytearray_format((PyByteArrayObject *)v, w);
+ return _PyBytes_FormatEx(PyByteArray_AS_STRING(v), PyByteArray_GET_SIZE(v), w, 1);
}
static PyNumberMethods bytearray_as_number = {