]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Remove asserts that confuse `enum _framestate` with `enum _frameowner` (GH-124148)
authorAnders Kaseorg <andersk@mit.edu>
Thu, 2 Jan 2025 16:55:33 +0000 (08:55 -0800)
committerGitHub <noreply@github.com>
Thu, 2 Jan 2025 16:55:33 +0000 (16:55 +0000)
commita626f9a67b76e5fe69677afd5f8317d8c61de8de
tree6e8d94da7878700595cdcfbe6a627d26be87d130
parent58e9f95c4aa970db32a94b9152b51ede22f823bd
Remove asserts that confuse `enum _framestate` with `enum _frameowner` (GH-124148)

The `owner` field of `_PyInterpreterFrame` is supposed to be a member of
`enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`.

At present, it happens that `FRAME_CLEARED` is not numerically equal to any
member of `enum _frameowner`, but that could change in the future. The code
that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit
a53cc3f49463e50cb3e2b839b3a82e6bf7f73fee (GH-116687). Remove the incorrect
checks for `owner != FRAME_CLEARED` as well.
Python/frame.c