]> granicus.if.org Git - python/commit
Rewrite PyBytes_FromFormatV() using _PyBytesWriter API
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 13 Oct 2015 22:21:35 +0000 (00:21 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 13 Oct 2015 22:21:35 +0000 (00:21 +0200)
commit03dab786b2f504791ac46a9f9b9db82e634efd05
tree148e1a5f699bbdd43647370140065af1b69e78be
parentb6d84832bfa1f453d3c73d6db0982aee0e6d04fe
Rewrite PyBytes_FromFormatV() using _PyBytesWriter API

* Add much more unit tests on PyBytes_FromFormatV()
* Remove the first loop to compute the length of the output string
* Use _PyBytesWriter to handle the bytes buffer, use overallocation
* Cleanup the code to make simpler and easier to review
Lib/test/test_bytes.py
Objects/bytesobject.c