mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
98ea54c35c
commit
12174a5dca
5 changed files with 13 additions and 12 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue