mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +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
|
@ -2714,7 +2714,7 @@ _PyErr_TrySetFromCause(const char *format, ...)
|
|||
same_basic_size = (
|
||||
caught_type_size == base_exc_size ||
|
||||
(PyType_SUPPORTS_WEAKREFS(caught_type) &&
|
||||
(caught_type_size == base_exc_size + sizeof(PyObject *))
|
||||
(caught_type_size == base_exc_size + (Py_ssize_t)sizeof(PyObject *))
|
||||
)
|
||||
);
|
||||
if (caught_type->tp_init != (initproc)BaseException_init ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue