comparison 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
comparison
equal deleted inserted replaced
80:f47101dc3c18 81:de34f4a4d353
42 exit(2); 42 exit(2);
43 } 43 }
44 } 44 }
45 45
46 /* XXX what is the ideal initialization order? */ 46 /* XXX what is the ideal initialization order? */
47 /* XXX exceptions are initialized by initrun but this
48 may be too late */
47 49
48 initsys(argc-1, argv+1); 50 initsys(argc-1, argv+1);
49 inittime(); 51 inittime();
50 initmath(); 52 initmath();
51 53
56 58
57 if (!isatty(fileno(fp))) { 59 if (!isatty(fileno(fp))) {
58 ret = runfile(fp, file_input, (char *)NULL, (char *)NULL); 60 ret = runfile(fp, file_input, (char *)NULL, (char *)NULL);
59 } 61 }
60 else { 62 else {
61 sysset("ps1", newstringobject(">>> ")); 63 object *v, *w;
62 sysset("ps2", newstringobject("... ")); 64 sysset("ps1", v = newstringobject(">>> "));
65 sysset("ps2", w = newstringobject("... "));
66 DECREF(v);
67 DECREF(w);
63 for (;;) { 68 for (;;) {
64 object *v = sysget("ps1"), *w = sysget("ps2");
65 char *ps1 = NULL, *ps2 = NULL; 69 char *ps1 = NULL, *ps2 = NULL;
70 v = sysget("ps1");
71 w = sysget("ps2");
66 if (v != NULL && is_stringobject(v)) { 72 if (v != NULL && is_stringobject(v)) {
67 INCREF(v); 73 INCREF(v);
68 ps1 = getstringvalue(v); 74 ps1 = getstringvalue(v);
69 } 75 }
70 else 76 else