From bfe51ea5c83fc67aa7f4a04832e7366b2d3e289d Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Mon, 27 Feb 2006 22:48:55 +0000 Subject: [PATCH] Fix assertions. --- Python/compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/compile.c b/Python/compile.c index c09aa701bf..d5555d57d9 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -257,11 +257,11 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags, if (!__doc__) { __doc__ = PyString_InternFromString("__doc__"); if (!__doc__) - goto error; + return NULL; } if (!compiler_init(&c)) - goto error; + return NULL; c.c_filename = filename; c.c_arena = arena; c.c_future = PyFuture_FromAST(mod, filename); @@ -291,7 +291,7 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags, error: compiler_free(&c); - assert(!PyErr_Occurred()); + assert(co || PyErr_Occurred()); return co; } -- 2.40.0