• Victor Stinner's avatar
    Issue #25318: Add _PyBytesWriter API · fdfbf781
    Victor Stinner yazdı
    Add a new private API to optimize Unicode encoders. It uses a small buffer
    allocated on the stack and supports overallocation.
    
    Use _PyBytesWriter API for UCS1 (ASCII and Latin1) and UTF-8 encoders. Enable
    overallocation for the UTF-8 encoder with error handlers.
    
    unicode_encode_ucs1(): initialize collend to collstart+1 to not check the
    current character twice, we already know that it is not ASCII.
    fdfbf781
unicodeobject.h 77.2 KB