STINNER Victor added the comment:
> Perhaps the code will be easier if reorganize it.
Ah yes, your version is simpler. I commited your patch, thanks.
I also fixed the XXX to check the integer overflow:
if (Py_SIZE(self) > (Py_ssize_t)PY_SSIZE_T_MAX - growth) {
PyErr_NoMemory();
return -1;
}
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19568>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com