From: Stefan Behnel Date: Mon, 7 Dec 2009 23:40:56 +0000 (+0100) Subject: cleanup, use -1 as exception value for double conversion X-Git-Tag: 0.12.1~62 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=21442abae90475c288970438ff645da4b5710e19;p=cython.git cleanup, use -1 as exception value for double conversion --- 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.