Ignore:
Timestamp:
05/29/11 22:51:30 (3 years ago)
Author:
xi
Message:

Clear cyclic references in the parser and the emitter to avoid extra GC calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/constructor.py

    r303 r377  
    5959 
    6060    def construct_object(self, node, deep=False): 
     61        if node in self.constructed_objects: 
     62            return self.constructed_objects[node] 
    6163        if deep: 
    6264            old_deep = self.deep_construct 
    6365            self.deep_construct = True 
    64         if node in self.constructed_objects: 
    65             return self.constructed_objects[node] 
    6666        if node in self.recursive_objects: 
    6767            raise ConstructorError(None, None, 
Note: See TracChangeset for help on using the changeset viewer.