From a44966457b7f796872e324182f96fc436d35d995 Mon Sep 17 00:00:00 2001 From: DagSverreSeljebotn Date: Tue, 25 Nov 2008 12:30:05 -0800 Subject: [PATCH] fix for infinite loop in buffer code --- Cython/Compiler/Buffer.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.26.2