cython
changeset 1381:43d4e2b19134
fix for infinite loop in buffer code
| author | DagSverreSeljebotn |
|---|---|
| date | Tue Nov 25 12:30:05 2008 -0800 (4 years ago) |
| parents | 04e83ffd8ea2 |
| children | c8d4fc990029 |
| files | Cython/Compiler/Buffer.py |
line diff
1.1 --- a/Cython/Compiler/Buffer.py Fri Nov 07 06:55:37 2008 +0100
1.2 +++ b/Cython/Compiler/Buffer.py Tue Nov 25 12:30:05 2008 -0800
1.3 @@ -710,7 +710,11 @@
1.4
1.5 # Search all types for __getbuffer__ overloads
1.6 types = []
1.7 + visited_scopes = set()
1.8 def find_buffer_types(scope):
1.9 + if scope in visited_scopes:
1.10 + return
1.11 + visited_scopes.add(scope)
1.12 for m in scope.cimported_modules:
1.13 find_buffer_types(m)
1.14 for e in scope.type_entries:
