Mercurial > cpython-lru_cache-weakref
comparison Python/errors.c @ 86974:954167ce92a3
Issue #19512: add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Wed, 06 Nov 2013 22:41:44 +0100 |
| parents | eeec58c57964 |
| children | 77bebcf5c4cf |
comparison
equal
deleted
inserted
replaced
| 86973:6348764bacdd | 86974:954167ce92a3 |
|---|---|
| 842 PyObject *moduleName = NULL; | 842 PyObject *moduleName = NULL; |
| 843 char* className; | 843 char* className; |
| 844 | 844 |
| 845 PyErr_Fetch(&t, &v, &tb); | 845 PyErr_Fetch(&t, &v, &tb); |
| 846 | 846 |
| 847 f = PySys_GetObject("stderr"); | 847 f = _PySys_GetObjectId(&_PyId_stderr); |
| 848 if (f == NULL || f == Py_None) | 848 if (f == NULL || f == Py_None) |
| 849 goto done; | 849 goto done; |
| 850 | 850 |
| 851 if (obj) { | 851 if (obj) { |
| 852 if (PyFile_WriteString("Exception ignored in: ", f) < 0) | 852 if (PyFile_WriteString("Exception ignored in: ", f) < 0) |
