Skip to content

Commit dfd6b01

Browse files
Fix merge problems
Co-Authored-By: Brandt Bucher <[email protected]>
1 parent 80194fb commit dfd6b01

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3114,10 +3114,12 @@ dummy_func(
31143114
_PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit_Ex(tstate,
31153115
(PyFunctionObject *)func, locals,
31163116
nargs, callargs, kwargs);
3117-
STACK_SHRINK(2); /* get rid of func and NULL */
3117+
// Need to manually shrinkg the stack since we exit with DISPATCH_INLINED.
3118+
STACK_SHRINK(oparg + 3);
31183119
if (new_frame == NULL) {
31193120
goto error;
31203121
}
3122+
frame->return_offset = 0;
31213123
DISPATCH_INLINED(new_frame);
31223124
}
31233125
result = PyObject_Call(func, callargs, kwargs);

Python/ceval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,7 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, PyFunctionObject *func,
15131513
{
15141514
bool has_dict = (kwargs != NULL && PyDict_GET_SIZE(kwargs) > 0);
15151515
PyObject *kwnames = NULL;
1516+
PyObject *const *newargs;
15161517
if (has_dict) {
15171518
newargs = _PyStack_UnpackDict(tstate, _PyTuple_ITEMS(callargs), nargs, kwargs, &kwnames);
15181519
if (newargs == NULL) {

Python/generated_cases.c.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)