aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKirill Simonov <xi@resolvent.net>2011-05-30 02:51:30 +0000
committerKirill Simonov <xi@resolvent.net>2011-05-30 02:51:30 +0000
commit7e1b5fae0b6154dbcce7f90e81562a5ab814a7cc (patch)
treeeb086caaf462460ed465e27830c6429f9dd33571 /tests
parent23c952fe08b2e7ea0f8d7673f45b17547e331f4b (diff)
downloadpyyaml-7e1b5fae0b6154dbcce7f90e81562a5ab814a7cc.tar.gz
Clear cyclic references in the parser and the emitter to avoid extra GC calls.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/canonical.py3
-rw-r--r--tests/lib3/canonical.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/canonical.py b/tests/lib/canonical.py
index 41d111a..020e6db 100644
--- a/tests/lib/canonical.py
+++ b/tests/lib/canonical.py
@@ -211,6 +211,9 @@ class CanonicalParser:
self.events = []
self.parsed = False
+ def dispose(self):
+ pass
+
# stream: STREAM-START document* STREAM-END
def parse_stream(self):
self.get_token(yaml.StreamStartToken)
diff --git a/tests/lib3/canonical.py b/tests/lib3/canonical.py
index e04477b..a8b4e3a 100644
--- a/tests/lib3/canonical.py
+++ b/tests/lib3/canonical.py
@@ -212,6 +212,9 @@ class CanonicalParser:
self.events = []
self.parsed = False
+ def dispose(self):
+ pass
+
# stream: STREAM-START document* STREAM-END
def parse_stream(self):
self.get_token(yaml.StreamStartToken)