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/lib3/yaml/constructor.py

    r361 r377  
    5252 
    5353    def construct_object(self, node, deep=False): 
     54        if node in self.constructed_objects: 
     55            return self.constructed_objects[node] 
    5456        if deep: 
    5557            old_deep = self.deep_construct 
    5658            self.deep_construct = True 
    57         if node in self.constructed_objects: 
    58             return self.constructed_objects[node] 
    5959        if node in self.recursive_objects: 
    6060            raise ConstructorError(None, None, 
Note: See TracChangeset for help on using the changeset viewer.