summaryrefslogtreecommitdiffstats
path: root/Python/clinic/import.c.h
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 /Python/clinic/import.c.h
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 'Python/clinic/import.c.h')
-rw-r--r--Python/clinic/import.c.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h
index 3ecd2ac..5edeaef 100644
--- a/Python/clinic/import.c.h
+++ b/Python/clinic/import.c.h
@@ -605,10 +605,6 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb
if (PyObject_GetBuffer(args[1], &source, PyBUF_SIMPLE) != 0) {
goto exit;
}
- if (!PyBuffer_IsContiguous(&source, 'C')) {
- _PyArg_BadArgument("source_hash", "argument 'source'", "contiguous buffer", args[1]);
- goto exit;
- }
return_value = _imp_source_hash_impl(module, key, &source);
exit:
@@ -627,4 +623,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=c37ad1bf06f9e947 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dbd63707bd40b07c input=a9049054013a1b77]*/