From 2337909dab61c922f5069fca8d4b296507e19479 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 3 Apr 2009 15:59:21 -0700 Subject: [PATCH] Include stdexcept in all cases. --- Cython/Compiler/Nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 8840933e..706dbea7 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -565,6 +565,8 @@ class CFuncDeclaratorNode(CDeclaratorNode): exc_val = None exc_check = 0 + if self.exception_check == '+': + env.add_include_file('stdexcept') if return_type.is_pyobject \ and (self.exception_value or self.exception_check) \ and self.exception_check != '+': @@ -575,7 +577,6 @@ 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): -- 2.26.2