Fix large integer exception return codes.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 14 Nov 2010 07:23:57 +0000 (23:23 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 14 Nov 2010 07:23:57 +0000 (23:23 -0800)
Cython/Compiler/Nodes.py

index 878ad29ab1fc2d62686b7e414b916cf7f7867d0c..f5a2bb73f3b2ad6ed49565781ef51a768647e9af 100644 (file)
@@ -592,6 +592,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
                             "Exception value must be a Python exception or cdef function with no arguments.")
                     exc_val = self.exception_value
                 else:
+                    self.exception_value = self.exception_value.coerce_to(return_type, env)
                     if self.exception_value.analyse_const_expression(env):
                         exc_val = self.exception_value.get_constant_c_result_code()
                         if exc_val is None: