Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 65614:18989ad44636
remove broken code accounting an offset the size of the line #10186
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sun, 24 Oct 2010 02:52:05 +0000 |
| parents | e2ba1249a2f5 |
| children | f148f864b168 |
comparison
equal
deleted
inserted
replaced
| 65611:ebf6741a8d6e | 65614:18989ad44636 |
|---|---|
| 1342 static void | 1342 static void |
| 1343 print_error_text(PyObject *f, int offset, const char *text) | 1343 print_error_text(PyObject *f, int offset, const char *text) |
| 1344 { | 1344 { |
| 1345 char *nl; | 1345 char *nl; |
| 1346 if (offset >= 0) { | 1346 if (offset >= 0) { |
| 1347 if (offset > 0 && offset == (int)strlen(text)) | |
| 1348 offset--; | |
| 1349 for (;;) { | 1347 for (;;) { |
| 1350 nl = strchr(text, '\n'); | 1348 nl = strchr(text, '\n'); |
| 1351 if (nl == NULL || nl-text >= offset) | 1349 if (nl == NULL || nl-text >= offset) |
| 1352 break; | 1350 break; |
| 1353 offset -= (int)(nl+1-text); | 1351 offset -= (int)(nl+1-text); |
