]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-94808: Reorganize _make_posargs and mark unused code (GH-119227)
authorMark Jason Dominus (陶敏修) <mjd@pobox.com>
Tue, 4 Jun 2024 12:59:56 +0000 (08:59 -0400)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 12:59:56 +0000 (14:59 +0200)
commitbd8c1f97e1709b5e8b07c31b1bc7b73acc76169d
tree1c16eea0d406dd89e651ff591e6cafabb66dea68
parent99d945c0c006e3246ac00338e37c443c6e08fc5c
gh-94808: Reorganize _make_posargs and mark unused code (GH-119227)

* Reorganize four-way if-elsif-elsif-elsif as nested if-elses
* Mark unused branch in _make_posargs

`names_with_default` is never `NULL`, even if there are no names with
defaults.  In that case it points to a structure with `size` zero.

Rather than eliminating the branch, we leave it behind with an `assert(0)`
in case a future change to the grammar exercises the branch.
Parser/action_helpers.c