From d04899abb0da4cc7c0a390f5bc52d57ace8955fd Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 4 Nov 2022 17:40:43 -0700 Subject: GH-99104: Update headers for bytecodes.c and generate_cases.py (#99112) Also tweak the labels near the end of bytecodes.c. --- Python/bytecodes.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'Python/bytecodes.c') diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 16ac1d9d2e9..e87ca6ebe8a 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1,3 +1,11 @@ +// This file contains instruction definitions. +// It is read by Tools/cases_generator/generate_cases.py +// to generate Python/generated_cases.c.h. +// Note that there is some dummy C code at the top and bottom of the file +// to fool text editors like VS Code into believing this is valid C code. +// The actual instruction definitions start at // BEGIN BYTECODES //. +// See Tools/cases_generator/README.md for more information. + #include "Python.h" #include "pycore_abstract.h" // _PyIndex_Check() #include "pycore_call.h" // _PyObject_FastCallDictTstate() @@ -4003,13 +4011,14 @@ dummy_func( // END BYTECODES // } - error:; - exception_unwind:; - handle_eval_breaker:; - resume_frame:; - resume_with_error:; - start_frame:; - unbound_local_error:; + error: + exception_unwind: + handle_eval_breaker: + resume_frame: + resume_with_error: + start_frame: + unbound_local_error: + ; } // Families go below this point // -- cgit v1.2.3