Issue #20179: Apply Argument Clinic to bytes and bytearray.
Patch by Tal Einat.
diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c
index 4e8107b..5314ab4 100644
--- a/Objects/bytes_methods.c
+++ b/Objects/bytes_methods.c
@@ -382,9 +382,9 @@
}
PyObject *
-_Py_bytes_maketrans(PyObject *args)
+_Py_bytes_maketrans(PyObject *frm, PyObject *to)
{
- PyObject *frm, *to, *res = NULL;
+ PyObject *res = NULL;
Py_buffer bfrm, bto;
Py_ssize_t i;
char *p;
@@ -392,8 +392,6 @@
bfrm.len = -1;
bto.len = -1;
- if (!PyArg_ParseTuple(args, "OO:maketrans", &frm, &to))
- return NULL;
if (_getbuffer(frm, &bfrm) < 0)
return NULL;
if (_getbuffer(to, &bto) < 0)