summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-11-18 17:40:32 (GMT)
committerGuido van Rossum <guido@python.org>1990-11-18 17:40:32 (GMT)
commitc6aa9e90ade8b0c5917cf8ba7c85baa1cd2421bc (patch)
tree8f7e06f9105d8a211258af21072b874606fdd0e7 /Python
parent840bcf11a84430826f26e3a9ecce356fff536ed2 (diff)
downloadcpython-c6aa9e90ade8b0c5917cf8ba7c85baa1cd2421bc.zip
cpython-c6aa9e90ade8b0c5917cf8ba7c85baa1cd2421bc.tar.gz
cpython-c6aa9e90ade8b0c5917cf8ba7c85baa1cd2421bc.tar.bz2
Some extra DECREFs.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonmain.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index 1ffba19..ffff0ae 100644
--- a/Python/pythonmain.c
+++ b/Python/pythonmain.c
@@ -44,6 +44,8 @@ main(argc, argv)
}
/* XXX what is the ideal initialization order? */
+ /* XXX exceptions are initialized by initrun but this
+ may be too late */
initsys(argc-1, argv+1);
inittime();
@@ -58,11 +60,15 @@ main(argc, argv)
ret = runfile(fp, file_input, (char *)NULL, (char *)NULL);
}
else {
- sysset("ps1", newstringobject(">>> "));
- sysset("ps2", newstringobject("... "));
+ object *v, *w;
+ sysset("ps1", v = newstringobject(">>> "));
+ sysset("ps2", w = newstringobject("... "));
+ DECREF(v);
+ DECREF(w);
for (;;) {
- object *v = sysget("ps1"), *w = sysget("ps2");
char *ps1 = NULL, *ps2 = NULL;
+ v = sysget("ps1");
+ w = sysget("ps2");
if (v != NULL && is_stringobject(v)) {
INCREF(v);
ps1 = getstringvalue(v);