]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef() (#108309)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Aug 2023 15:40:26 +0000 (17:40 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 15:40:26 +0000 (17:40 +0200)
commitf5559f38d9831e7e55a518e516bcd620ec13af14
treeb605c775e1bc02b864d17e663400cde01562088d
parent154477be722ae5c4e18d22d0860e284006b09c4f
gh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef() (#108309)

Replace PyDict_GetItem() calls with PyDict_GetItemRef()
or PyDict_GetItemWithError() to handle errors.

* Replace PyLong_AS_LONG() with _PyLong_AsInt()
  and check for errors.
* Check for PyDict_Contains() error.
* pycore_init_builtins() checks for _PyType_Lookup() failure.
Python/assemble.c
Python/compile.c
Python/flowgraph.c
Python/pylifecycle.c