diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-05-06-10-53-47.bpo-44060.ScfYXD.rst b/Misc/NEWS.d/next/Core and Builtins/2021-05-06-10-53-47.bpo-44060.ScfYXD.rst new file mode 100644 index 00000000000000..7114d929225f75 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-05-06-10-53-47.bpo-44060.ScfYXD.rst @@ -0,0 +1,2 @@ +The TARGET_#op label is now available even when computed gotos aren't +enabled. diff --git a/Python/ceval.c b/Python/ceval.c index 25548e34db246b..e2c5a381f03fa3 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1296,11 +1296,15 @@ eval_frame_handle_pending(PyThreadState *tstate) #define USE_COMPUTED_GOTOS 0 #endif -#if USE_COMPUTED_GOTOS +#if USE_COMPUTED_GOTOS || defined(Py_DEBUG) #define TARGET(op) op: TARGET_##op -#define DISPATCH_GOTO() goto *opcode_targets[opcode] #else #define TARGET(op) op +#endif + +#if USE_COMPUTED_GOTOS +#define DISPATCH_GOTO() goto *opcode_targets[opcode] +#else #define DISPATCH_GOTO() goto dispatch_opcode #endif
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: