Skip to content

Commit e630cf2

Browse files
fix for TC interpreter
1 parent e3cfa51 commit e630cf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Python/ceval_macros.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,16 @@ do { \
427427
/* How much scratch space to give stackref to PyObject* conversion. */
428428
#define MAX_STACKREF_SCRATCH 10
429429

430+
#if Py_TAIL_CALL_INTERP
431+
#define STACKREFS_TO_PYOBJECTS(ARGS, ARG_COUNT, NAME) \
432+
/* +1 because vectorcall might use -1 to write self */ \
433+
PyObject *NAME##_temp[MAX_STACKREF_SCRATCH+1]; \
434+
PyObject **NAME = _PyObjectArray_FromStackRefArray(ARGS, ARG_COUNT, NAME##_temp + 1);
435+
#else
430436
#define STACKREFS_TO_PYOBJECTS(ARGS, ARG_COUNT, NAME) \
431437
PyObject **NAME##_temp = (PyObject **)&STACKREF_SCRATCH; \
432438
PyObject **NAME = _PyObjectArray_FromStackRefArray(ARGS, ARG_COUNT, NAME##_temp + 1);
439+
#endif
433440

434441
#define STACKREFS_TO_PYOBJECTS_CLEANUP(NAME) \
435442
/* +1 because we +1 previously */ \

0 commit comments

Comments
 (0)