]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-122561: Clean up and microoptimize str.translate and charmap codec (GH-122932)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 28 Aug 2024 09:11:13 +0000 (12:11 +0300)
committerGitHub <noreply@github.com>
Wed, 28 Aug 2024 09:11:13 +0000 (12:11 +0300)
commit1a0b828994ed4ec1f2ba05123995a7d1e852f4b4
tree77fdc324262eb57e237d652d96cda6234618ca89
parent6f563e364d1a7902417573f842019746a79cdc1b
gh-122561: Clean up and microoptimize str.translate and charmap codec (GH-122932)

* Replace PyLong_AS_LONG() with PyLong_AsLong().
* Call PyLong_AsLong() only once per the replacement code.
* Use PyMapping_GetOptionalItem() instead of PyObject_GetItem().
Objects/unicodeobject.c