Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 36696:e0a77010d033 legacy-trunk
Fix assertions.
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Mon, 27 Feb 2006 22:48:55 +0000 |
| parents | b6d2f6fd3e11 |
| children | 78de5f6b2f67 |
line wrap: on
line diff
--- a/Python/compile.c Mon Feb 27 22:32:47 2006 +0000 +++ b/Python/compile.c Mon Feb 27 22:48:55 2006 +0000 @@ -257,11 +257,11 @@ 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 @@ error: compiler_free(&c); - assert(!PyErr_Occurred()); + assert(co || PyErr_Occurred()); return co; }
