Add stdexcept when except+ syntax is used.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 27 Mar 2009 19:51:09 +0000 (12:51 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 27 Mar 2009 19:51:09 +0000 (12:51 -0700)
Cython/Compiler/Nodes.py

index ce6a1af0e89a4f98408ea7d12bfe9f383b879087..1757a7d7cf07cf4b7b560212207f21d2180a39e3 100644 (file)
@@ -575,6 +575,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
                 self.exception_value.analyse_const_expression(env)
                 if self.exception_check == '+':
                     exc_val_type = self.exception_value.type
+                    env.add_include_file('stdexcept')
                     if not exc_val_type.is_error and \
                           not exc_val_type.is_pyobject and \
                           not (exc_val_type.is_cfunction and not exc_val_type.return_type.is_pyobject and len(exc_val_type.args)==0):