summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
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/_sqlite
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/_sqlite')
-rw-r--r--Modules/_sqlite/clinic/blob.c.h6
-rw-r--r--Modules/_sqlite/clinic/connection.c.h6
2 files changed, 2 insertions, 10 deletions
diff --git a/Modules/_sqlite/clinic/blob.c.h b/Modules/_sqlite/clinic/blob.c.h
index 2c63817..b95ba94 100644
--- a/Modules/_sqlite/clinic/blob.c.h
+++ b/Modules/_sqlite/clinic/blob.c.h
@@ -88,10 +88,6 @@ blob_write(pysqlite_Blob *self, PyObject *arg)
if (PyObject_GetBuffer(arg, &data, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&data, 'C')) {
- _PyArg_BadArgument("write", "argument", "contiguous buffer", arg);
- goto exit;
- }
return_value = blob_write_impl(self, &data);
exit:
@@ -215,4 +211,4 @@ blob_exit(pysqlite_Blob *self, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=27c24afc687bd772 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=31abd55660e0c5af input=a9049054013a1b77]*/
diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h
index 46761cd..db5eb77 100644
--- a/Modules/_sqlite/clinic/connection.c.h
+++ b/Modules/_sqlite/clinic/connection.c.h
@@ -1557,10 +1557,6 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs,
if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&data, 'C')) {
- _PyArg_BadArgument("deserialize", "argument 1", "contiguous buffer", args[0]);
- goto exit;
- }
}
if (!noptargs) {
goto skip_optional_kwonly;
@@ -1822,4 +1818,4 @@ exit:
#ifndef DESERIALIZE_METHODDEF
#define DESERIALIZE_METHODDEF
#endif /* !defined(DESERIALIZE_METHODDEF) */
-/*[clinic end generated code: output=b9c27a406e329587 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=90b5b9c14261b8d7 input=a9049054013a1b77]*/