From 0ed536d0283844e1e7abcb6640abf16393ff074c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 21 Jan 2013 07:22:10 +0100 Subject: [PATCH] avoid unused utility code for abs() --- Cython/Compiler/Builtin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py index 23815fc..7bd6206 100644 --- a/Cython/Compiler/Builtin.py +++ b/Cython/Compiler/Builtin.py @@ -24,6 +24,10 @@ static CYTHON_INLINE unsigned int __Pyx_abs_int(int x) { return ((unsigned int)INT_MAX) + 1U; return (unsigned int) abs(x); } +''') + +abs_long_utility_code = UtilityCode( +proto = ''' static CYTHON_INLINE unsigned long __Pyx_abs_long(long x) { if (unlikely(x == -LONG_MAX-1)) return ((unsigned long)LONG_MAX) + 1U; @@ -201,7 +205,7 @@ builtin_function_table = [ ], is_strict_signature = True)), BuiltinFunction('abs', None, None, "__Pyx_abs_long", - utility_code = abs_int_utility_code, + utility_code = abs_long_utility_code, func_type = PyrexTypes.CFuncType( PyrexTypes.c_ulong_type, [ PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_long_type, None) -- 2.7.4