New submission from Ma Lin <malin...@163.com>:
Above code already cover this check: if (Py_SIZE(v) == newsize) { /* return early if newsize equals to v->ob_size */ return 0; } if (Py_SIZE(v) == 0) { - if (newsize == 0) { - return 0; - } *pv = _PyBytes_FromSize(newsize, 0); Py_DECREF(v); return (*pv == NULL) ? -1 : 0; } ---------- messages: 385626 nosy: malin priority: normal severity: normal status: open title: Remove a redundant check in _PyBytes_Resize() versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43023> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com