summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/posixmodule.c.h
diff options
context:
space:
mode:
authorFurkan Onder <furkanonder@protonmail.com>2023-10-23 09:54:46 (GMT)
committerGitHub <noreply@github.com>2023-10-23 09:54:46 (GMT)
commit32c37fe1ba708b8290cfa971e130bcfc29f1ead3 (patch)
treecb2ea772b12098a174426a058203f6683a14d8e2 /Modules/clinic/posixmodule.c.h
parentc84b0390c053446b746b65ec82755918955e79e0 (diff)
downloadcpython-32c37fe1ba708b8290cfa971e130bcfc29f1ead3.zip
cpython-32c37fe1ba708b8290cfa971e130bcfc29f1ead3.tar.gz
cpython-32c37fe1ba708b8290cfa971e130bcfc29f1ead3.tar.bz2
gh-67565: Remove redundant C-contiguity checks (GH-105521)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Diffstat (limited to 'Modules/clinic/posixmodule.c.h')
-rw-r--r--Modules/clinic/posixmodule.c.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 29c90c5..9473dd7 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -7208,10 +7208,6 @@ os_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (PyObject_GetBuffer(args[1], &data, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&data, 'C')) {
- _PyArg_BadArgument("write", "argument 2", "contiguous buffer", args[1]);
- goto exit;
- }
_return_value = os_write_impl(module, fd, &data);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
@@ -7810,10 +7806,6 @@ os_pwrite(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (PyObject_GetBuffer(args[1], &buffer, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&buffer, 'C')) {
- _PyArg_BadArgument("pwrite", "argument 2", "contiguous buffer", args[1]);
- goto exit;
- }
if (!Py_off_t_converter(args[2], &offset)) {
goto exit;
}
@@ -10252,10 +10244,6 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject
if (PyObject_GetBuffer(args[2], &value, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&value, 'C')) {
- _PyArg_BadArgument("setxattr", "argument 'value'", "contiguous buffer", args[2]);
- goto exit;
- }
if (!noptargs) {
goto skip_optional_pos;
}
@@ -12415,4 +12403,4 @@ exit:
#ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF
#define OS_WAITSTATUS_TO_EXITCODE_METHODDEF
#endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */
-/*[clinic end generated code: output=274174066fff3256 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a05abdc48e3def44 input=a9049054013a1b77]*/