]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 14 Oct 2015 11:32:13 +0000 (13:32 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 14 Oct 2015 11:32:13 +0000 (13:32 +0200)
commit2ec8063cc960d32e244dc6a27567f66a447bbda3
tree0bcd652fd3dbcf365ab584d64748d2406eb5c295
parent1285e5c80562ac84ca8bc0ea39b100215d1808a1
Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI

* Don't overallocate by 400% when recode is needed: only overallocate on demand
  using _PyBytesWriter.
* Use _PyLong_DigitValue to convert hexadecimal digit to int
* Create _PyBytes_DecodeEscapeRecode() subfunction
Include/longobject.h
Objects/bytesobject.c