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/_ssl.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/_ssl.c.h')
-rw-r--r-- | Modules/clinic/_ssl.c.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index bc69251..88401b0 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -237,10 +237,6 @@ _ssl__SSLSocket_write(PySSLSocket *self, PyObject *arg) if (PyObject_GetBuffer(arg, &b, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&b, 'C')) { - _PyArg_BadArgument("write", "argument", "contiguous buffer", arg); - goto exit; - } return_value = _ssl__SSLSocket_write_impl(self, &b); exit: @@ -530,10 +526,6 @@ _ssl__SSLContext__set_alpn_protocols(PySSLContext *self, PyObject *arg) if (PyObject_GetBuffer(arg, &protos, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&protos, 'C')) { - _PyArg_BadArgument("_set_alpn_protocols", "argument", "contiguous buffer", arg); - goto exit; - } return_value = _ssl__SSLContext__set_alpn_protocols_impl(self, &protos); exit: @@ -1108,10 +1100,6 @@ _ssl_MemoryBIO_write(PySSLMemoryBIO *self, PyObject *arg) if (PyObject_GetBuffer(arg, &b, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&b, 'C')) { - _PyArg_BadArgument("write", "argument", "contiguous buffer", arg); - goto exit; - } return_value = _ssl_MemoryBIO_write_impl(self, &b); exit: @@ -1180,10 +1168,6 @@ _ssl_RAND_add(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (PyObject_GetBuffer(args[0], &view, PyBUF_SIMPLE) != 0) { goto exit; } - if (!PyBuffer_IsContiguous(&view, 'C')) { - _PyArg_BadArgument("RAND_add", "argument 1", "contiguous buffer", args[0]); - goto exit; - } } if (PyFloat_CheckExact(args[1])) { entropy = PyFloat_AS_DOUBLE(args[1]); @@ -1543,4 +1527,4 @@ exit: #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=f15635b2faa3b2db input=a9049054013a1b77]*/ +/*[clinic end generated code: output=aa6b0a898b6077fe input=a9049054013a1b77]*/ |