Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 65616:a4a27240fe09 2.7
Merged revisions 85814 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line
remove broken code accounting an offset the size of the line #10186
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sun, 24 Oct 2010 03:00:35 +0000 |
| parents | 55397533da51 |
| children | 64cee8d11f2e |
comparison
equal
deleted
inserted
replaced
| 65612:a94fb8db9f1a | 65616:a4a27240fe09 |
|---|---|
| 1043 static void | 1043 static void |
| 1044 print_error_text(PyObject *f, int offset, const char *text) | 1044 print_error_text(PyObject *f, int offset, const char *text) |
| 1045 { | 1045 { |
| 1046 char *nl; | 1046 char *nl; |
| 1047 if (offset >= 0) { | 1047 if (offset >= 0) { |
| 1048 if (offset > 0 && offset == (int)strlen(text)) | |
| 1049 offset--; | |
| 1050 for (;;) { | 1048 for (;;) { |
| 1051 nl = strchr(text, '\n'); | 1049 nl = strchr(text, '\n'); |
| 1052 if (nl == NULL || nl-text >= offset) | 1050 if (nl == NULL || nl-text >= offset) |
| 1053 break; | 1051 break; |
| 1054 offset -= (int)(nl+1-text); | 1052 offset -= (int)(nl+1-text); |
