cython-devel
changeset 4005:8f5e3310b54b
fix error handling in sequential cython runs
| author | Stefan Behnel <scoder@users.berlios.de> |
|---|---|
| date | Wed Nov 24 19:21:42 2010 +0100 (2 years ago) |
| parents | e9aaad624bb6 |
| children | b1f04712264b |
| files | Cython/Compiler/Errors.py Cython/Compiler/Main.py |
line diff
1.1 --- a/Cython/Compiler/Errors.py Tue Nov 23 20:16:07 2010 +0100
1.2 +++ b/Cython/Compiler/Errors.py Wed Nov 24 19:21:42 2010 +0100
1.3 @@ -201,3 +201,11 @@
1.4
1.5 def held_errors():
1.6 return error_stack[-1]
1.7 +
1.8 +
1.9 +# this module needs a redesign to support parallel cythonisation, but
1.10 +# for now, the following works at least in sequential compiler runs
1.11 +
1.12 +def reset():
1.13 + _warn_once_seen.clear()
1.14 + del error_stack[:]
2.1 --- a/Cython/Compiler/Main.py Tue Nov 23 20:16:07 2010 +0100
2.2 +++ b/Cython/Compiler/Main.py Wed Nov 24 19:21:42 2010 +0100
2.3 @@ -510,6 +510,7 @@
2.4 return ".".join(names)
2.5
2.6 def setup_errors(self, options, result):
2.7 + Errors.reset() # clear any remaining error state
2.8 if options.use_listing_file:
2.9 result.listing_file = Utils.replace_suffix(source, ".lis")
2.10 path = result.listing_file
