From b2c3ca1e38dacdbcdbad088628968f381de7a4a4 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Mon, 16 Nov 2009 17:33:25 +0000 Subject: [PATCH] Silence MSVC warning about unary minus applied to unsigned type. --- Objects/rangeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 0fee40f6841..f45b7717d65 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -316,7 +316,7 @@ range_reverse(PyObject *seq) calculation is also done modulo ULONG_MAX+1. */ it->start = (long)(start + (unsigned long)(len-1) * step); - it->step = (long)(-(unsigned long)step); + it->step = (long)(0UL-step); return (PyObject *)it; }