Mercurial > cpython-lru_cache-weakref
diff Python/pythonmain.c @ 81:de34f4a4d353 legacy-trunk
Some extra DECREFs.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 18 Nov 1990 17:40:32 +0000 |
| parents | a36c348a8e1a |
| children | a6934380c6e7 |
line wrap: on
line diff
--- a/Python/pythonmain.c Sun Nov 18 17:39:41 1990 +0000 +++ b/Python/pythonmain.c Sun Nov 18 17:40:32 1990 +0000 @@ -44,6 +44,8 @@ } /* 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 @@ 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);
