summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-02-27 22:48:55 (GMT)
committerThomas Wouters <thomas@python.org>2006-02-27 22:48:55 (GMT)
commitbfe51ea5c83fc67aa7f4a04832e7366b2d3e289d (patch)
tree596b65051f5b85257810cec06f5c563bd80228d3
parentc2e20744b2b7811632030470971c31630f0975e2 (diff)
downloadcpython-bfe51ea5c83fc67aa7f4a04832e7366b2d3e289d.zip
cpython-bfe51ea5c83fc67aa7f4a04832e7366b2d3e289d.tar.gz
cpython-bfe51ea5c83fc67aa7f4a04832e7366b2d3e289d.tar.bz2
Fix assertions.
-rw-r--r--Python/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index c09aa70..d5555d5 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;
}