Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1175c43

Browse files
committed
Clarify C-style exception handling with proper label name.
1 parent bfe51ea commit 1175c43

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags,
266266
c.c_arena = arena;
267267
c.c_future = PyFuture_FromAST(mod, filename);
268268
if (c.c_future == NULL)
269-
goto error;
269+
goto finally;
270270
if (!flags) {
271271
local_flags.cf_flags = 0;
272272
flags = &local_flags;
@@ -281,15 +281,15 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags,
281281
if (c.c_st == NULL) {
282282
if (!PyErr_Occurred())
283283
PyErr_SetString(PyExc_SystemError, "no symtable");
284-
goto error;
284+
goto finally;
285285
}
286286

287287
/* XXX initialize to NULL for now, need to handle */
288288
c.c_encoding = NULL;
289289

290290
co = compiler_mod(&c, mod);
291291

292-
error:
292+
finally:
293293
compiler_free(&c);
294294
assert(co || PyErr_Occurred());
295295
return co;

0 commit comments

Comments
 (0)