]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117431: Adapt bytes and bytearray .find() and friends to Argument Clinic (#117502)
authorErlend E. Aasland <erlend@python.org>
Fri, 12 Apr 2024 07:40:55 +0000 (09:40 +0200)
committerGitHub <noreply@github.com>
Fri, 12 Apr 2024 07:40:55 +0000 (07:40 +0000)
commitdeb921f85173a194afb4386553d85c3f99767ca1
treec5f32d62bf1ad727f25f6e8b084876c32d8a96e2
parent49fc1414b52b31f6ad0408775d160ec0559c33bb
gh-117431: Adapt bytes and bytearray .find() and friends to Argument Clinic (#117502)

This change gives a significant speedup, as the METH_FASTCALL calling
convention is now used. The following bytes and bytearray methods are adapted:

- count()
- find()
- index()
- rfind()
- rindex()

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Include/internal/pycore_bytes_methods.h
Misc/NEWS.d/next/Core and Builtins/2024-04-12-09-09-11.gh-issue-117431.lxFEeJ.rst [new file with mode: 0644]
Objects/bytearrayobject.c
Objects/bytes_methods.c
Objects/bytesobject.c
Objects/clinic/bytearrayobject.c.h
Objects/clinic/bytesobject.c.h
Objects/stringlib/find.h