summaryrefslogtreecommitdiffstats
path: root/Include/cpython/bytesobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-03-02 13:15:26 (GMT)
committerGitHub <noreply@github.com>2022-03-02 13:15:26 (GMT)
commitb6b711a1aa233001c1874af1d920e459b6bf962c (patch)
treedb9de75d0d1a794dace09ccba274a22f733bff63 /Include/cpython/bytesobject.h
parent03642df1a1cfddcd740b62e78bddfa3ea6863da4 (diff)
downloadcpython-b6b711a1aa233001c1874af1d920e459b6bf962c.zip
cpython-b6b711a1aa233001c1874af1d920e459b6bf962c.tar.gz
cpython-b6b711a1aa233001c1874af1d920e459b6bf962c.tar.bz2
bpo-46848: Move _PyBytes_Find() to internal C API (GH-31642)
Move _PyBytes_Find() and _PyBytes_ReverseFind() functions to the internal C API. bytesobject.c now includes pycore_bytesobject.h.
Diffstat (limited to 'Include/cpython/bytesobject.h')
-rw-r--r--Include/cpython/bytesobject.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/Include/cpython/bytesobject.h b/Include/cpython/bytesobject.h
index 38a0fe0..6b3f552 100644
--- a/Include/cpython/bytesobject.h
+++ b/Include/cpython/bytesobject.h
@@ -116,22 +116,3 @@ PyAPI_FUNC(void*) _PyBytesWriter_WriteBytes(_PyBytesWriter *writer,
void *str,
const void *bytes,
Py_ssize_t size);
-
-/* Substring Search.
-
- Returns the index of the first occurence of
- a substring ("needle") in a larger text ("haystack").
- If the needle is not found, return -1.
- If the needle is found, add offset to the index.
-*/
-
-PyAPI_FUNC(Py_ssize_t)
-_PyBytes_Find(const char *haystack, Py_ssize_t len_haystack,
- const char *needle, Py_ssize_t len_needle,
- Py_ssize_t offset);
-
-/* Same as above, but search right-to-left */
-PyAPI_FUNC(Py_ssize_t)
-_PyBytes_ReverseFind(const char *haystack, Py_ssize_t len_haystack,
- const char *needle, Py_ssize_t len_needle,
- Py_ssize_t offset);