https://github.com/python/cpython/commit/46ac85e4d9fcffe1a8f921989414a89648b5501a
commit: 46ac85e4d9fcffe1a8f921989414a89648b5501a
branch: main
author: Ken Jin <[email protected]>
committer: Fidget-Spinner <[email protected]>
date: 2025-02-18T15:48:49Z
summary:

gh-129989: Change Py_TAIL_CALL_INTERP ifndef to ! (#130269)

Change Py_TAIL_CALL_INTERP ifndef to !

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

diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 3f8f711c55956f..1c5fdf847b62c2 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -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));
diff --git a/Python/ceval.c b/Python/ceval.c
index 28b26ffb5de43d..cf9a8713ed9803 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index e7f8fdce41b58a..01fa857b96ac3b 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -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)
@@ -4409,7 +4409,7 @@
             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));
@@ -11929,7 +11929,7 @@
         }
 
             /* END INSTRUCTIONS */
-#ifndef Py_TAIL_CALL_INTERP
+#if !Py_TAIL_CALL_INTERP
 #if USE_COMPUTED_GOTOS
         _unknown_opcode:
 #else
diff --git a/Tools/cases_generator/tier1_generator.py 
b/Tools/cases_generator/tier1_generator.py
index dd9faa3587e32b..83ac8b921111ee 100644
--- a/Tools/cases_generator/tier1_generator.py
+++ b/Tools/cases_generator/tier1_generator.py
@@ -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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to