commit | 455df9779873b8335b20292b8d0c43d66338a4db | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Wed Apr 15 14:05:24 2020 +0200 |
committer | GitHub <noreply@github.com> | Wed Apr 15 14:05:24 2020 +0200 |
tree | ea819b9d6b534e8fb5eaa58dc5b2bae64e475a18 | |
parent | a86b522d8f1c8b9c26b5550de221d2227158cf4d [diff] |
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.