]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Optimize _Py_strhex_impl() (GH-19535)
authorVictor Stinner <vstinner@python.org>
Wed, 15 Apr 2020 12:05:24 +0000 (14:05 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Apr 2020 12:05:24 +0000 (14:05 +0200)
commit455df9779873b8335b20292b8d0c43d66338a4db
treeea819b9d6b534e8fb5eaa58dc5b2bae64e475a18
parenta86b522d8f1c8b9c26b5550de221d2227158cf4d
Optimize _Py_strhex_impl() (GH-19535)

Avoid a temporary buffer to create a bytes string: use
PyBytes_FromStringAndSize() to directly allocate a bytes object.

Cleanup also the code: PEP 7 formatting, move variable definitions
closer to where they are used. Fix assertion checking "j" index.
Python/pystrhex.c