summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-04 19:12:13 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-04 19:12:13 (GMT)
commit6d023c98b06e8b4558f3558335433f371a89cc9b (patch)
tree9a1b3cb88da4ef20e5a3cbb2e676845ca85e3d78 /Python/pythonrun.c
parent524b588553afb0759c5be590a7aa41db92dcd2ae (diff)
downloadcpython-6d023c98b06e8b4558f3558335433f371a89cc9b.zip
cpython-6d023c98b06e8b4558f3558335433f371a89cc9b.tar.gz
cpython-6d023c98b06e8b4558f3558335433f371a89cc9b.tar.bz2
Added 1995 to copyright message.
bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index f66c8d7..c706081 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1,6 +1,6 @@
/***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
All Rights Reserved
@@ -178,12 +178,12 @@ run_tty_1(fp, filename)
return -1;
d = getmoduledict(m);
v = run_node(n, filename, d, d);
- flushline();
if (v == NULL) {
print_error();
return -1;
}
DECREF(v);
+ flushline();
return 0;
}
@@ -211,12 +211,12 @@ run_script(fp, filename)
} else {
v = run_file(fp, filename, file_input, d, d);
}
- flushline();
if (v == NULL) {
print_error();
return -1;
}
DECREF(v);
+ flushline();
return 0;
}
@@ -230,12 +230,12 @@ run_command(command)
return -1;
d = getmoduledict(m);
v = run_string(command, file_input, d, d);
- flushline();
if (v == NULL) {
print_error();
return -1;
}
DECREF(v);
+ flushline();
return 0;
}
@@ -244,6 +244,7 @@ print_error()
{
object *exception, *v, *tb, *f;
err_fetch(&exception, &v, &tb);
+ flushline();
if (exception == NULL)
fatal("print_error called but no exception");
if (exception == SystemExit) {