Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 48874:4db1f5098175
#3663: extra DECREF on syntax errors.
Patch by Amaury Forgeot d'Arc, reviewed by Benjamin Peterson.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Tue, 26 Aug 2008 22:02:58 +0000 |
| parents | 587cd4f66c2d |
| children | dab7abb77e8f |
comparison
equal
deleted
inserted
replaced
| 48873:03c23c50654e | 48874:4db1f5098175 |
|---|---|
| 1240 } | 1240 } |
| 1241 PyErr_Fetch(&exception, &v, &tb); | 1241 PyErr_Fetch(&exception, &v, &tb); |
| 1242 if (exception == NULL) | 1242 if (exception == NULL) |
| 1243 return; | 1243 return; |
| 1244 PyErr_NormalizeException(&exception, &v, &tb); | 1244 PyErr_NormalizeException(&exception, &v, &tb); |
| 1245 tb = tb ? tb : Py_None; | 1245 if (tb == NULL) { |
| 1246 tb = Py_None; | |
| 1247 Py_INCREF(tb); | |
| 1248 } | |
| 1246 PyException_SetTraceback(v, tb); | 1249 PyException_SetTraceback(v, tb); |
| 1247 if (exception == NULL) | 1250 if (exception == NULL) |
| 1248 return; | 1251 return; |
| 1249 /* Now we know v != NULL too */ | 1252 /* Now we know v != NULL too */ |
| 1250 if (set_sys_last_vars) { | 1253 if (set_sys_last_vars) { |
