Commit eec9f0ff authored by Stefan Behnel's avatar Stefan Behnel

trial fix for bizarre build bug

parent bf6f3c10
...@@ -4,7 +4,7 @@ cdef class BasicVisitor: ...@@ -4,7 +4,7 @@ cdef class BasicVisitor:
cdef dict dispatch_table cdef dict dispatch_table
cpdef visit(self, obj) cpdef visit(self, obj)
cdef _visit(self, obj) cdef _visit(self, obj)
cdef _find_handler(self, obj) cdef find_handler(self, obj)
cdef class TreeVisitor(BasicVisitor): cdef class TreeVisitor(BasicVisitor):
cdef public list access_path cdef public list access_path
......
...@@ -26,11 +26,11 @@ class BasicVisitor(object): ...@@ -26,11 +26,11 @@ class BasicVisitor(object):
try: try:
handler_method = self.dispatch_table[type(obj)] handler_method = self.dispatch_table[type(obj)]
except KeyError: except KeyError:
handler_method = self._find_handler(obj) handler_method = self.find_handler(obj)
self.dispatch_table[type(obj)] = handler_method self.dispatch_table[type(obj)] = handler_method
return handler_method(obj) return handler_method(obj)
def _find_handler(self, obj): def find_handler(self, obj):
cls = type(obj) cls = type(obj)
#print "Cache miss for class %s in visitor %s" % ( #print "Cache miss for class %s in visitor %s" % (
# cls.__name__, type(self).__name__) # cls.__name__, type(self).__name__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment