From: Thomas Wouters Date: Mon, 27 Feb 2006 22:48:55 +0000 (+0000) Subject: Fix assertions. X-Git-Tag: v2.5a0~506 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfe51ea5c83fc67aa7f4a04832e7366b2d3e289d;p=thirdparty%2FPython%2Fcpython.git Fix assertions. --- diff --git a/Python/compile.c b/Python/compile.c index c09aa701bf20..d5555d57d9cd 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; }