[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
Ma Lin added the comment: Found a new issue, can be combined with this issue. -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
Change by Ma Lin : -- keywords: +patch pull_requests: +23149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24330 ___ Python tracker ___

[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
New submission from Ma Lin : 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 =