From: DagSverreSeljebotn Date: Tue, 25 Nov 2008 20:30:05 +0000 (-0800) Subject: fix for infinite loop in buffer code X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a44966457b7f796872e324182f96fc436d35d995;p=cython.git fix for infinite loop in buffer code --- diff --git a/Cython/Compiler/Buffer.py b/Cython/Compiler/Buffer.py index c53a5ca4..ad1bce58 100644 --- a/Cython/Compiler/Buffer.py +++ b/Cython/Compiler/Buffer.py @@ -710,7 +710,11 @@ def use_py2_buffer_functions(env): # Search all types for __getbuffer__ overloads types = [] + visited_scopes = set() def find_buffer_types(scope): + if scope in visited_scopes: + return + visited_scopes.add(scope) for m in scope.cimported_modules: find_buffer_types(m) for e in scope.type_entries: