summaryrefslogtreecommitdiffstats
path: root/Objects/clinic/bytesobject.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/clinic/bytesobject.c.h')
-rw-r--r--Objects/clinic/bytesobject.c.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h
index 8b08f8e..1e45be3 100644
--- a/Objects/clinic/bytesobject.c.h
+++ b/Objects/clinic/bytesobject.c.h
@@ -141,10 +141,6 @@ bytes_partition(PyBytesObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &sep, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&sep, 'C')) {
- _PyArg_BadArgument("partition", "argument", "contiguous buffer", arg);
- goto exit;
- }
return_value = bytes_partition_impl(self, &sep);
exit:
@@ -184,10 +180,6 @@ bytes_rpartition(PyBytesObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &sep, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&sep, 'C')) {
- _PyArg_BadArgument("rpartition", "argument", "contiguous buffer", arg);
- goto exit;
- }
return_value = bytes_rpartition_impl(self, &sep);
exit:
@@ -503,17 +495,9 @@ bytes_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs)
if (PyObject_GetBuffer(args[0], &frm, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&frm, 'C')) {
- _PyArg_BadArgument("maketrans", "argument 1", "contiguous buffer", args[0]);
- goto exit;
- }
if (PyObject_GetBuffer(args[1], &to, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&to, 'C')) {
- _PyArg_BadArgument("maketrans", "argument 2", "contiguous buffer", args[1]);
- goto exit;
- }
return_value = bytes_maketrans_impl(&frm, &to);
exit:
@@ -563,17 +547,9 @@ bytes_replace(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
if (PyObject_GetBuffer(args[0], &old, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&old, 'C')) {
- _PyArg_BadArgument("replace", "argument 1", "contiguous buffer", args[0]);
- goto exit;
- }
if (PyObject_GetBuffer(args[1], &new, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&new, 'C')) {
- _PyArg_BadArgument("replace", "argument 2", "contiguous buffer", args[1]);
- goto exit;
- }
if (nargs < 3) {
goto skip_optional;
}
@@ -629,10 +605,6 @@ bytes_removeprefix(PyBytesObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &prefix, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&prefix, 'C')) {
- _PyArg_BadArgument("removeprefix", "argument", "contiguous buffer", arg);
- goto exit;
- }
return_value = bytes_removeprefix_impl(self, &prefix);
exit:
@@ -669,10 +641,6 @@ bytes_removesuffix(PyBytesObject *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &suffix, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&suffix, 'C')) {
- _PyArg_BadArgument("removesuffix", "argument", "contiguous buffer", arg);
- goto exit;
- }
return_value = bytes_removesuffix_impl(self, &suffix);
exit:
@@ -1061,4 +1029,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=da013a7e257f5c6e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8a49dbbd78914a6f input=a9049054013a1b77]*/