]> granicus.if.org Git - python/commitdiff
Silence another MSVC warning about unary minus.
authorMark Dickinson <dickinsm@gmail.com>
Mon, 16 Nov 2009 19:17:16 +0000 (19:17 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Mon, 16 Nov 2009 19:17:16 +0000 (19:17 +0000)
Objects/intobject.c

index 8a8972c711dacfc00cd6a937bdf4543821b11572..dce569a6efaf2ef636f891647cae16f8a18c517f 100644 (file)
@@ -1117,7 +1117,7 @@ int_to_decimal_string(PyIntObject *v) {
        long n = v->ob_ival;
        unsigned long absn;
        p = bufend = buf + sizeof(buf);
-       absn = n < 0 ? -(unsigned long)n : n;
+       absn = n < 0 ? 0UL - n : n;
        do {
                *--p = '0' + absn % 10;
                absn /= 10;