summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2017-09-12 00:59:22 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-09-12 00:59:22 (GMT)
commit8728018624f257c7cfe44014742ae46134047f49 (patch)
treed3465549106d04472cb05f70b317f20dd7fc77f6 /Include
parentba6d5d1defd7a281c8c8804e4b4cfd7370886236 (diff)
downloadcpython-8728018624f257c7cfe44014742ae46134047f49.zip
cpython-8728018624f257c7cfe44014742ae46134047f49.tar.gz
cpython-8728018624f257c7cfe44014742ae46134047f49.tar.bz2
bpo-30860: Fix a refleak. (#3506)
* Drop warnoptions from PyInterpreterState. * Drop xoptions from PyInterpreterState. * Don't set warnoptions and _xoptions again. * Decref after adding to sys.__dict__. * Drop an unused macro. * Check sys.xoptions *before* we delete it.
Diffstat (limited to 'Include')
-rw-r--r--Include/object.h3
-rw-r--r--Include/pystate.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/Include/object.h b/Include/object.h
index b46d4c3..9bb780e 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -727,14 +727,13 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
/* Py_REF_DEBUG also controls the display of refcounts and memory block
* allocations at the interactive prompt and at interpreter shutdown
*/
+PyAPI_FUNC(PyObject *) _PyDebug_XOptionShowRefCount(void);
PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void);
-#define _PY_DEBUG_PRINT_TOTAL_REFS() _PyDebug_PrintTotalRefs()
#else
#define _Py_INC_REFTOTAL
#define _Py_DEC_REFTOTAL
#define _Py_REF_DEBUG_COMMA
#define _Py_CHECK_REFCNT(OP) /* a semicolon */;
-#define _PY_DEBUG_PRINT_TOTAL_REFS()
#endif /* Py_REF_DEBUG */
#ifdef COUNT_ALLOCS
diff --git a/Include/pystate.h b/Include/pystate.h
index d986e35..5b75bb0 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -60,8 +60,6 @@ typedef struct _is {
/* Used in Python/sysmodule.c. */
int check_interval;
- PyObject *warnoptions;
- PyObject *xoptions;
/* Used in Modules/_threadmodule.c. */
long num_threads;