mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-67565: Remove redundant C-contiguity checks (GH-105521)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
This commit is contained in:
parent
c84b0390c0
commit
32c37fe1ba
30 changed files with 36 additions and 464 deletions
|
@ -185,13 +185,7 @@ ascii_buffer_converter(PyObject *arg, Py_buffer *buf)
|
|||
"not '%.100s'", Py_TYPE(arg)->tp_name);
|
||||
return 0;
|
||||
}
|
||||
if (!PyBuffer_IsContiguous(buf, 'C')) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"argument should be a contiguous buffer, "
|
||||
"not '%.100s'", Py_TYPE(arg)->tp_name);
|
||||
PyBuffer_Release(buf);
|
||||
return 0;
|
||||
}
|
||||
assert(PyBuffer_IsContiguous(buf, 'C'));
|
||||
return Py_CLEANUP_SUPPORTED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue