diff options
author | Furkan Onder <furkanonder@protonmail.com> | 2023-10-23 09:54:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 09:54:46 (GMT) |
commit | 32c37fe1ba708b8290cfa971e130bcfc29f1ead3 (patch) | |
tree | cb2ea772b12098a174426a058203f6683a14d8e2 /Modules/clinic/_bz2module.c.h | |
parent | c84b0390c053446b746b65ec82755918955e79e0 (diff) | |
download | cpython-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/_bz2module.c.h')
-rw-r--r-- | Modules/clinic/_bz2module.c.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index b665c01..de7b399 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -35,10 +35,6 @@ _bz2_BZ2Compressor_compress(BZ2Compressor *self, PyObject *arg) if (PyObject_GetBuffer(arg, &data, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&data, 'C')) { - _PyArg_BadArgument("compress", "argument", "contiguous buffer", arg); - goto exit; - } return_value = _bz2_BZ2Compressor_compress_impl(self, &data); exit: @@ -181,10 +177,6 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&data, 'C')) { - _PyArg_BadArgument("decompress", "argument 'data'", "contiguous buffer", args[0]); - goto exit; - } if (!noptargs) { goto skip_optional_pos; } @@ -242,4 +234,4 @@ _bz2_BZ2Decompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=90f7b5c451c0a8bf input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8daa62f47cc4853d input=a9049054013a1b77]*/ |