summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_tools/test_c_analyzer/test_c_analyzer_common/test_known.py3
-rw-r--r--Tools/c-analyzer/c_parser/info.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_tools/test_c_analyzer/test_c_analyzer_common/test_known.py b/Lib/test/test_tools/test_c_analyzer/test_c_analyzer_common/test_known.py
index 215023d..93100e0 100644
--- a/Lib/test/test_tools/test_c_analyzer/test_c_analyzer_common/test_known.py
+++ b/Lib/test/test_tools/test_c_analyzer/test_c_analyzer_common/test_known.py
@@ -15,6 +15,9 @@ class FromFileTests(unittest.TestCase):
_return_read_tsv = ()
+ def tearDown(self):
+ Variable._isglobal.instances.clear()
+
@property
def calls(self):
try:
diff --git a/Tools/c-analyzer/c_parser/info.py b/Tools/c-analyzer/c_parser/info.py
index 9ab6979..d7368b4 100644
--- a/Tools/c-analyzer/c_parser/info.py
+++ b/Tools/c-analyzer/c_parser/info.py
@@ -22,6 +22,9 @@ class Variable(_NTBase,
__slots__ = ()
_isglobal = util.Slot()
+ def __del__(self):
+ del self._isglobal
+
@classonly
def from_parts(cls, filename, funcname, name, vartype, isglobal=False):
id = info.ID(filename, funcname, name)