summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-08-15 21:17:38 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-08-15 21:17:38 (GMT)
commit12174a5dcaf1bdcd8d5fd790a8cad07049bddce6 (patch)
treecd7632afadd1043e9708251c220e872639b767dc /Objects/longobject.c
parent98ea54c35c37e4f9a7d7a923a7ccd792f4b7ff90 (diff)
downloadcpython-12174a5dcaf1bdcd8d5fd790a8cad07049bddce6.zip
cpython-12174a5dcaf1bdcd8d5fd790a8cad07049bddce6.tar.gz
cpython-12174a5dcaf1bdcd8d5fd790a8cad07049bddce6.tar.bz2
Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Objects/ subdirectory. PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative slot identifiers.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index c1416a0..68dc85f 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5094,13 +5094,13 @@ _PyLong_Init(void)
* to the original refcnt + 1 */
Py_REFCNT(op) = refcnt + 1;
assert(Py_SIZE(op) == size);
- assert(v->ob_digit[0] == abs(ival));
+ assert(v->ob_digit[0] == (digit)abs(ival));
}
else {
(void)PyObject_INIT(v, &PyLong_Type);
}
Py_SIZE(v) = size;
- v->ob_digit[0] = abs(ival);
+ v->ob_digit[0] = (digit)abs(ival);
}
#endif
/* initialize int_info */