@@ -6548,9 +6548,9 @@ static int
6548
6548
pattern_helper_rotate (struct compiler * c , location loc , Py_ssize_t count )
6549
6549
{
6550
6550
while (1 < count ) {
6551
- _ADDOP_I (c , loc , SWAP , count -- );
6551
+ ADDOP_I (c , loc , SWAP , count -- );
6552
6552
}
6553
- return 1 ;
6553
+ return SUCCESS ;
6554
6554
}
6555
6555
6556
6556
static int
@@ -6575,7 +6575,9 @@ pattern_helper_store_name(struct compiler *c, location loc,
6575
6575
}
6576
6576
// Rotate this object underneath any items we need to preserve:
6577
6577
Py_ssize_t rotations = pc -> on_top + PyList_GET_SIZE (pc -> stores ) + 1 ;
6578
- RETURN_IF_FALSE (pattern_helper_rotate (c , loc , rotations ));
6578
+ if (pattern_helper_rotate (c , loc , rotations ) < 0 ) {
6579
+ return 0 ;
6580
+ }
6579
6581
return !PyList_Append (pc -> stores , n );
6580
6582
}
6581
6583
@@ -7024,7 +7026,7 @@ compiler_pattern_or(struct compiler *c, pattern_ty p, pattern_context *pc)
7024
7026
// Do the same thing to the stack, using several
7025
7027
// rotations:
7026
7028
while (rotations -- ) {
7027
- if (! pattern_helper_rotate (c , LOC (alt ), icontrol + 1 )) {
7029
+ if (pattern_helper_rotate (c , LOC (alt ), icontrol + 1 ) < 0 ) {
7028
7030
goto error ;
7029
7031
}
7030
7032
}
@@ -7060,7 +7062,7 @@ compiler_pattern_or(struct compiler *c, pattern_ty p, pattern_context *pc)
7060
7062
Py_ssize_t nrots = nstores + 1 + pc -> on_top + PyList_GET_SIZE (pc -> stores );
7061
7063
for (Py_ssize_t i = 0 ; i < nstores ; i ++ ) {
7062
7064
// Rotate this capture to its proper place on the stack:
7063
- if (! pattern_helper_rotate (c , LOC (p ), nrots )) {
7065
+ if (pattern_helper_rotate (c , LOC (p ), nrots ) < 0 ) {
7064
7066
goto error ;
7065
7067
}
7066
7068
// Update the list of previous stores with this new name, checking for
0 commit comments