mirror of
https://github.com/yaml/pyyaml.git
synced 2025-10-19 11:03:18 +00:00
Clear cyclic references in the parser and the emitter to avoid extra GC calls.
This commit is contained in:
parent
23c952fe08
commit
7e1b5fae0b
11 changed files with 130 additions and 44 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue