gh-67565: Remove redundant C-contiguity checks (GH-105521)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
This commit is contained in:
Furkan Onder 2023-10-23 12:54:46 +03:00 committed by GitHub
parent c84b0390c0
commit 32c37fe1ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 36 additions and 464 deletions

View file

@ -4133,7 +4133,8 @@ _ssl__SSLContext_load_verify_locations_impl(PySSLContext *self,
if (PyObject_GetBuffer(cadata, &buf, PyBUF_SIMPLE)) {
goto error;
}
if (!PyBuffer_IsContiguous(&buf, 'C') || buf.ndim > 1) {
assert(PyBuffer_IsContiguous(&buf, 'C'));
if (buf.ndim > 1) {
PyBuffer_Release(&buf);
PyErr_SetString(PyExc_TypeError,
"cadata should be a contiguous buffer with "