Windson Yang <[email protected]> added the comment:
Hello, Tim Peters. I wonder why we need to add size_t here:
assert((size_t)Py_SIZE(a) + (size_t)Py_SIZE(b) <= (size_t)PY_SSIZE_T_MAX);
AFAIK, PY_SSIZE_T_MAX = ((Py_ssize_t)(((size_t)-1)>>1)) which is signed, either
Py_SIZE(a) or Py_SIZE(b) is a positive number. Why we need to concast them to
size_t, Thank you?
----------
nosy: +Windson Yang
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34397>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com