diff options
author | Christian Heimes <christian@cheimes.de> | 2013-08-25 14:19:29 +0200 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-08-25 14:19:29 +0200 |
commit | 2d218c8a43918bc780643b9966bf62a21291401b (patch) | |
tree | fc1f2b0576f01496f4c8472343b12de55426b3b1 /Python/traceback.c | |
parent | 0f7a30525e7ba7085d3ecd9f4103ac0830b3fb4d (diff) | |
parent | 1d0fb524dce05d5cbd391449416b77e862ab045b (diff) | |
download | cpython-2d218c8a43918bc780643b9966bf62a21291401b.tar.gz |
Issue #18747: Fix spelling errors in my commit message and comments,
thanks to Vajrasky Kok for proof-reading.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 74075c9481..4f2e732779 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -13,7 +13,7 @@ #define OFF(x) offsetof(PyTracebackObject, x) -#define PUTS(fd, str) write(fd, str, strlen(str)) +#define PUTS(fd, str) write(fd, str, (int)strlen(str)) #define MAX_STRING_LENGTH 500 #define MAX_FRAME_DEPTH 100 #define MAX_NTHREADS 100 @@ -246,10 +246,12 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) binary = _PyObject_CallMethodId(io, &PyId_open, "Os", filename, "rb"); if (binary == NULL) { + PyErr_Clear(); + binary = _Py_FindSourceFile(filename, buf, sizeof(buf), io); if (binary == NULL) { Py_DECREF(io); - return 0; + return -1; } } |