Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 7113:f5f305d7a617 legacy-trunk
It seems obvious that when Py_Finalize() decides that there's nothing
to do, it should not call sys.exitfunc either...
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 19 Jan 1998 22:00:38 +0000 |
| parents | bc007cf1d6ba |
| children | 3f255aedf621 |
comparison
equal
deleted
inserted
replaced
| 7112:ece4123e36ea | 7113:f5f305d7a617 |
|---|---|
| 177 Py_Finalize() | 177 Py_Finalize() |
| 178 { | 178 { |
| 179 PyInterpreterState *interp; | 179 PyInterpreterState *interp; |
| 180 PyThreadState *tstate; | 180 PyThreadState *tstate; |
| 181 | 181 |
| 182 call_sys_exitfunc(); | |
| 183 | |
| 184 if (!initialized) | 182 if (!initialized) |
| 185 return; | 183 return; |
| 186 initialized = 0; | 184 initialized = 0; |
| 185 | |
| 186 call_sys_exitfunc(); | |
| 187 | 187 |
| 188 /* Get current thread state and interpreter pointer */ | 188 /* Get current thread state and interpreter pointer */ |
| 189 tstate = PyThreadState_Get(); | 189 tstate = PyThreadState_Get(); |
| 190 interp = tstate->interp; | 190 interp = tstate->interp; |
| 191 | 191 |
