SIGN IN SIGN UP

[3.13] gh-122728: Fix SystemError in PyEval_GetLocals() (GH-122735) (#122757)

gh-122728: Fix SystemError in PyEval_GetLocals() (GH-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().
(cherry picked from commit 4767a6e31c0550836b2af45d27e374e721f0c4e6)

Co-authored-by: Victor Stinner <vstinner@python.org>
M
Miss Islington (bot) committed
5c161cb8329c941aa219dc34c56afa368516d6fb
Parent: e808146
Committed by GitHub <noreply@github.com> on 8/6/2024, 9:37:10 PM