-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
In configure.ac, if the user passes --tail-call-interp in the negative, we set Py_TAIL_CALL_INTERP to 0:
Lines 7027 to 7032 in 1feaecc
| if test "$withval" = no | |
| then | |
| AC_DEFINE([Py_TAIL_CALL_INTERP], [0], | |
| [Define if you want to use tail-calling interpreters in CPython.]) | |
| AC_MSG_RESULT([no]) | |
| fi |
However, in ceval_macros.h and bytecodes.c, we check for #ifdef Py_TAIL_CALL_INTERP and #if defined(Py_TAIL_CALL_INTERP), for instance:
Line 76 in 1feaecc
| #ifdef Py_TAIL_CALL_INTERP |
Thus, defining the macro -- even with a value of 0 -- actually enables the feature! I think the consistent behavior (consistent with USE_COMPUTED_GOTOS) is probably to switch the preprocessor guards to #if, instead of #ifdef.
Linked PRs
Metadata
Metadata
Assignees
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error