mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Clarify C-style exception handling with proper label name.
This commit is contained in:
parent
bfe51ea5c8
commit
1175c43a12
1 changed files with 3 additions and 3 deletions
|
@ -266,7 +266,7 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags,
|
||||||
c.c_arena = arena;
|
c.c_arena = arena;
|
||||||
c.c_future = PyFuture_FromAST(mod, filename);
|
c.c_future = PyFuture_FromAST(mod, filename);
|
||||||
if (c.c_future == NULL)
|
if (c.c_future == NULL)
|
||||||
goto error;
|
goto finally;
|
||||||
if (!flags) {
|
if (!flags) {
|
||||||
local_flags.cf_flags = 0;
|
local_flags.cf_flags = 0;
|
||||||
flags = &local_flags;
|
flags = &local_flags;
|
||||||
|
@ -281,7 +281,7 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags,
|
||||||
if (c.c_st == NULL) {
|
if (c.c_st == NULL) {
|
||||||
if (!PyErr_Occurred())
|
if (!PyErr_Occurred())
|
||||||
PyErr_SetString(PyExc_SystemError, "no symtable");
|
PyErr_SetString(PyExc_SystemError, "no symtable");
|
||||||
goto error;
|
goto finally;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX initialize to NULL for now, need to handle */
|
/* XXX initialize to NULL for now, need to handle */
|
||||||
|
@ -289,7 +289,7 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags,
|
||||||
|
|
||||||
co = compiler_mod(&c, mod);
|
co = compiler_mod(&c, mod);
|
||||||
|
|
||||||
error:
|
finally:
|
||||||
compiler_free(&c);
|
compiler_free(&c);
|
||||||
assert(co || PyErr_Occurred());
|
assert(co || PyErr_Occurred());
|
||||||
return co;
|
return co;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue