Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 3575:e2b3a696d69c legacy-trunk
Use new names for debug macros. Don't include pythonrun.h.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 22 May 1996 16:35:33 +0000 |
| parents | 3b6ebf8d2a59 |
| children | 0b0c4ed1936a |
comparison
equal
deleted
inserted
replaced
| 3574:1ec154241747 | 3575:e2b3a696d69c |
|---|---|
| 35 #include "sysmodule.h" | 35 #include "sysmodule.h" |
| 36 #include "bltinmodule.h" | 36 #include "bltinmodule.h" |
| 37 #include "compile.h" | 37 #include "compile.h" |
| 38 #include "eval.h" | 38 #include "eval.h" |
| 39 #include "ceval.h" | 39 #include "ceval.h" |
| 40 #include "pythonrun.h" | |
| 41 #include "import.h" | 40 #include "import.h" |
| 42 #include "marshal.h" | 41 #include "marshal.h" |
| 43 | 42 |
| 44 #ifdef HAVE_SIGNAL_H | 43 #ifdef HAVE_SIGNAL_H |
| 45 #include <signal.h> | 44 #include <signal.h> |
| 146 sysset("ps2", v = newstringobject("... ")); | 145 sysset("ps2", v = newstringobject("... ")); |
| 147 XDECREF(v); | 146 XDECREF(v); |
| 148 } | 147 } |
| 149 for (;;) { | 148 for (;;) { |
| 150 ret = run_tty_1(fp, filename); | 149 ret = run_tty_1(fp, filename); |
| 151 #ifdef REF_DEBUG | 150 #ifdef Py_REF_DEBUG |
| 152 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); | 151 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); |
| 153 #endif | 152 #endif |
| 154 if (ret == E_EOF) | 153 if (ret == E_EOF) |
| 155 return 0; | 154 return 0; |
| 156 /* | 155 /* |
| 651 | 650 |
| 652 doneimport(); | 651 doneimport(); |
| 653 | 652 |
| 654 err_clear(); | 653 err_clear(); |
| 655 | 654 |
| 656 #ifdef REF_DEBUG | 655 #ifdef Py_REF_DEBUG |
| 657 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); | 656 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); |
| 658 #endif | 657 #endif |
| 659 | 658 |
| 660 #ifdef TRACE_REFS | 659 #ifdef Py_TRACE_REFS |
| 661 if (askyesno("Print left references?")) { | 660 if (askyesno("Print left references?")) { |
| 662 printrefs(stderr); | 661 printrefs(stderr); |
| 663 } | 662 } |
| 664 #endif /* TRACE_REFS */ | 663 #endif /* Py_TRACE_REFS */ |
| 665 | 664 |
| 666 #ifdef macintosh | 665 #ifdef macintosh |
| 667 PyMac_Exit(sts); | 666 PyMac_Exit(sts); |
| 668 #else | 667 #else |
| 669 exit(sts); | 668 exit(sts); |
| 712 #endif | 711 #endif |
| 713 #endif /* HAVE_SIGNAL_H */ | 712 #endif /* HAVE_SIGNAL_H */ |
| 714 initintr(); /* May imply initsignal() */ | 713 initintr(); /* May imply initsignal() */ |
| 715 } | 714 } |
| 716 | 715 |
| 717 #ifdef TRACE_REFS | 716 #ifdef Py_TRACE_REFS |
| 718 /* Ask a yes/no question */ | 717 /* Ask a yes/no question */ |
| 719 | 718 |
| 720 int | 719 int |
| 721 askyesno(prompt) | 720 askyesno(prompt) |
| 722 char *prompt; | 721 char *prompt; |
