]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-122728: Fix SystemError in PyEval_GetLocals() (#122735)
authorVictor Stinner <vstinner@python.org>
Tue, 6 Aug 2024 21:01:44 +0000 (23:01 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Aug 2024 21:01:44 +0000 (23:01 +0200)
commit4767a6e31c0550836b2af45d27e374e721f0c4e6
treeac83bad530ad3f874446adb1c51311bacec48d89
parent5b8a6c5186be299d96dd483146dc6ea737ffdfe7
gh-122728: Fix SystemError in PyEval_GetLocals() (#122735)

Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.

Add an unit test on PyEval_GetLocals().
Lib/test/test_capi/test_misc.py
Misc/NEWS.d/next/C_API/2024-08-06-14-23-11.gh-issue-122728.l-fQ-v.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Python/ceval.c