Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 15814:faaf9f10d849 legacy-trunk
Fixed bugs noted by Greg Stein
* x wasn't initialized to NULL
* Did not DECREF result from displayhook function
| author | Moshe Zadka <moshez@math.huji.ac.il> |
|---|---|
| date | Thu, 11 Jan 2001 11:55:37 +0000 |
| parents | 1a00d21910c8 |
| children | e00f718e4d8a |
line wrap: on
line diff
--- a/Python/ceval.c Thu Jan 11 10:22:34 2001 +0000 +++ b/Python/ceval.c Thu Jan 11 11:55:37 2001 +0000 @@ -1250,6 +1250,7 @@ PyErr_SetString(PyExc_RuntimeError, "lost sys.displayhook"); err = -1; + x = NULL; } if (err == 0) { x = Py_BuildValue("(O)", v); @@ -1258,6 +1259,7 @@ } if (err == 0) { w = PyEval_CallObject(w, x); + Py_XDECREF(w); if (w == NULL) err = -1; }
