]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-129989: Change Py_TAIL_CALL_INTERP ifndef to ! (#130269)
authorKen Jin <kenjin@python.org>
Tue, 18 Feb 2025 15:48:49 +0000 (23:48 +0800)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2025 15:48:49 +0000 (15:48 +0000)
Change Py_TAIL_CALL_INTERP ifndef to !

Python/bytecodes.c
Python/ceval.c
Python/generated_cases.c.h
Tools/cases_generator/tier1_generator.py

index 3f8f711c55956f90698afcfd4fc5a691aafae611..1c5fdf847b62c2f3a20bd7941c515389bd30793c 100644 (file)
@@ -1358,7 +1358,7 @@ dummy_func(
 
         tier1 inst(CLEANUP_THROW, (sub_iter, last_sent_val, exc_value_st -- none, value)) {
             PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
-            #ifndef Py_TAIL_CALL_INTERP
+            #if !Py_TAIL_CALL_INTERP
             assert(throwflag);
             #endif
             assert(exc_value && PyExceptionInstance_Check(exc_value));
index 28b26ffb5de43d2f7bb94838eaa9a44d107e110c..cf9a8713ed9803d4d829dcfe58df80405011f042 100644 (file)
@@ -798,7 +798,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
 #ifdef Py_STATS
     int lastopcode = 0;
 #endif
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
     uint8_t opcode;    /* Current opcode */
     int oparg;         /* Current opcode argument, if any */
     assert(tstate->current_frame == NULL || tstate->current_frame->stackpointer != NULL);
index e7f8fdce41b58a082c1421a3c5893048babc4dde..01fa857b96ac3b0a9ebaa8221070fe66e82a61a0 100644 (file)
@@ -8,7 +8,7 @@
 #endif
 #define TIER_ONE 1
 
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
 #if !USE_COMPUTED_GOTOS
     dispatch_opcode:
         switch (opcode)
             last_sent_val = stack_pointer[-2];
             sub_iter = stack_pointer[-3];
             PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
-            #ifndef Py_TAIL_CALL_INTERP
+            #if !Py_TAIL_CALL_INTERP
             assert(throwflag);
             #endif
             assert(exc_value && PyExceptionInstance_Check(exc_value));
         }
 
             /* END INSTRUCTIONS */
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
 #if USE_COMPUTED_GOTOS
         _unknown_opcode:
 #else
index dd9faa3587e32bfafb7bbbdf205101e47548849c..83ac8b921111ee76a948e42688ec60c393c8e800 100644 (file)
@@ -160,7 +160,7 @@ def generate_tier1(
 #define TIER_ONE 1
 """)
     outfile.write(f"""
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
 #if !USE_COMPUTED_GOTOS
     dispatch_opcode:
         switch (opcode)
@@ -173,7 +173,7 @@ def generate_tier1(
     generate_tier1_cases(analysis, outfile, lines)
     outfile.write(f"""
             {INSTRUCTION_END_MARKER}
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
 #if USE_COMPUTED_GOTOS
         _unknown_opcode:
 #else