From 9cb0c38fff05776f598ebfb67a60abc3bff629e2 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 13 Jun 2001 20:45:17 +0000 Subject: [PATCH] PyLong_As{Unsigned,}LongLong: fiddled final result casting. --- Objects/longobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Objects/longobject.c b/Objects/longobject.c index 615d497632c..3c22470fb0d 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -572,7 +572,7 @@ PyLong_AsLongLong(PyObject *vv) (PyLongObject *)vv, (unsigned char *)&bytes, SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1); - return (LONG_LONG)(res < 0 ? res : bytes); + return res < 0 ? (LONG_LONG)res : bytes; } /* Get a C unsigned LONG_LONG int from a long int object. @@ -594,7 +594,7 @@ PyLong_AsUnsignedLongLong(PyObject *vv) (PyLongObject *)vv, (unsigned char *)&bytes, SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0); - return (unsigned LONG_LONG)(res < 0 ? res : bytes); + return res < 0 ? (unsigned LONG_LONG)res : bytes; } #undef IS_LITTLE_ENDIAN