From 21442abae90475c288970438ff645da4b5710e19 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 8 Dec 2009 00:40:56 +0100 Subject: [PATCH] cleanup, use -1 as exception value for double conversion --- Cython/Compiler/PyrexTypes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index ad19dc4d..35ac35f7 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -873,6 +873,8 @@ class CFloatType(CNumericType): is_float = 1 to_py_function = "PyFloat_FromDouble" from_py_function = "__pyx_PyFloat_AsDouble" + + exception_value = -1 def __init__(self, rank, pymemberdef_typecode = None, math_h_modifier = ''): CNumericType.__init__(self, rank, 1, pymemberdef_typecode) @@ -2020,7 +2022,6 @@ def widest_numeric_type(type1, type2): return type1 else: return sign_and_rank_to_type[min(type1.signed, type2.signed), max(type1.rank, type2.rank)] - return widest_type def spanning_type(type1, type2): # Return a type assignable from both type1 and type2. -- 2.26.2