mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Some extra DECREFs.
This commit is contained in:
parent
840bcf11a8
commit
c6aa9e90ad
1 changed files with 9 additions and 3 deletions
|
@ -44,6 +44,8 @@ main(argc, argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX what is the ideal initialization order? */
|
/* XXX what is the ideal initialization order? */
|
||||||
|
/* XXX exceptions are initialized by initrun but this
|
||||||
|
may be too late */
|
||||||
|
|
||||||
initsys(argc-1, argv+1);
|
initsys(argc-1, argv+1);
|
||||||
inittime();
|
inittime();
|
||||||
|
@ -58,11 +60,15 @@ main(argc, argv)
|
||||||
ret = runfile(fp, file_input, (char *)NULL, (char *)NULL);
|
ret = runfile(fp, file_input, (char *)NULL, (char *)NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sysset("ps1", newstringobject(">>> "));
|
object *v, *w;
|
||||||
sysset("ps2", newstringobject("... "));
|
sysset("ps1", v = newstringobject(">>> "));
|
||||||
|
sysset("ps2", w = newstringobject("... "));
|
||||||
|
DECREF(v);
|
||||||
|
DECREF(w);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
object *v = sysget("ps1"), *w = sysget("ps2");
|
|
||||||
char *ps1 = NULL, *ps2 = NULL;
|
char *ps1 = NULL, *ps2 = NULL;
|
||||||
|
v = sysget("ps1");
|
||||||
|
w = sysget("ps2");
|
||||||
if (v != NULL && is_stringobject(v)) {
|
if (v != NULL && is_stringobject(v)) {
|
||||||
INCREF(v);
|
INCREF(v);
|
||||||
ps1 = getstringvalue(v);
|
ps1 = getstringvalue(v);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue