diff options
author | Klaus117 <keenanlau12@gmail.com> | 2025-03-04 12:44:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-04 12:44:09 -0800 |
commit | c989e74446836ce8a00ae002d4c229c81e1f7905 (patch) | |
tree | 9025e9d51c1e1dc0baf47cb0875cfdc7e6623c57 /Python/optimizer_cases.c.h | |
parent | e20e47dda67451d24e8b3f5784d64135abebf92f (diff) | |
download | cpython-c989e74446836ce8a00ae002d4c229c81e1f7905.tar.gz cpython-c989e74446836ce8a00ae002d4c229c81e1f7905.zip |
GH-130415: Narrow int to 0 based on boolean tests (GH-130772)
Diffstat (limited to 'Python/optimizer_cases.c.h')
-rw-r--r-- | Python/optimizer_cases.c.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index 397184dd87a..9555e141ed5 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -178,7 +178,7 @@ value = stack_pointer[-1]; if (!optimize_to_bool(this_instr, ctx, value, &res)) { sym_set_type(value, &PyLong_Type); - res = sym_new_type(ctx, &PyBool_Type); + res = sym_new_truthiness(ctx, value, true); } stack_pointer[-1] = res; break; |