From 6160e548a327f82ae68386fa785c2122f8cf8da1 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 21 Sep 2013 21:06:02 -0700 Subject: [PATCH] Clarify macro arguments. --- Cython/Utility/TypeConversion.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c index b627469..c4018a2 100644 --- a/Cython/Utility/TypeConversion.c +++ b/Cython/Utility/TypeConversion.c @@ -450,20 +450,20 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) { /////////////// CIntFromPyVerify /////////////// -#define __PYX_VERIFY_RETURN_INT(type, value_type, func) \ - { \ - value_type value = func(x); \ - if (sizeof(type) < sizeof(value_type)) { \ - if (unlikely(value != (value_type) (type) value)) { \ - const value_type zero = 0; \ - PyErr_SetString(PyExc_OverflowError, \ - (is_unsigned && unlikely(value < zero)) ? \ - "can't convert negative value to " #type : \ - "value too large to convert to " #type); \ - return (type) -1; \ - } \ - } \ - return (type) value; \ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ + { \ + func_type value = func(x); \ + if (sizeof(target_type) < sizeof(func_type)) { \ + if (unlikely(value != (func_type) (target_type) value)) { \ + const func_type zero = 0; \ + PyErr_SetString(PyExc_OverflowError, \ + (is_unsigned && unlikely(value < zero)) ? \ + "can't convert negative value to " #target_type : \ + "value too large to convert to " #target_type); \ + return (target_type) -1; \ + } \ + } \ + return (target_type) value; \ } -- 2.7.4