Skip to content

Commit

Permalink
pythongh-117376: Fix off-by-ones in conversion functions (pythonGH-12…
Browse files Browse the repository at this point in the history
…4301)

Fix off-by-ones in conversion function
  • Loading branch information
Fidget-Spinner authored Sep 25, 2024
1 parent c1600c7 commit 198756b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@ dummy_func(
PyCFunctionFastWithKeywords cfunc =
(PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth;

STACKREFS_TO_PYOBJECTS(args, nargs, args_o);
STACKREFS_TO_PYOBJECTS(args, total_args, args_o);
if (CONVERSION_FAILED(args_o)) {
DECREF_INPUTS();
ERROR_IF(true, error);
Expand Down Expand Up @@ -4009,7 +4009,7 @@ dummy_func(
(PyCFunctionFast)(void(*)(void))meth->ml_meth;
int nargs = total_args - 1;

STACKREFS_TO_PYOBJECTS(args, nargs, args_o);
STACKREFS_TO_PYOBJECTS(args, total_args, args_o);
if (CONVERSION_FAILED(args_o)) {
DECREF_INPUTS();
ERROR_IF(true, error);
Expand Down
4 changes: 2 additions & 2 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 198756b

Please sign in to comment.