bpo-30860: Fix a refleak. (#3567)

Resolves bpo-31420.

(This was accidentally reverted when in #3565.)
This commit is contained in:
Eric Snow 2017-09-14 00:35:58 -07:00 committed by GitHub
parent 93c92f7d1d
commit dae0276bb6
7 changed files with 47 additions and 43 deletions

View file

@ -113,7 +113,10 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags *
err = -1;
for (;;) {
ret = PyRun_InteractiveOneObject(fp, filename, flags);
_PY_DEBUG_PRINT_TOTAL_REFS();
#ifdef Py_REF_DEBUG
if (_PyDebug_XOptionShowRefCount() == Py_True)
_PyDebug_PrintTotalRefs();
#endif
if (ret == E_EOF) {
err = 0;
break;