• Marc-André Lemburg's avatar
    Special case the "s#" PyArg_Parse() token for Unicode objects: · 0afff388
    Marc-André Lemburg authored
    "s#" will now return a pointer to the default encoded string data
    of the Unicode object instead of a pointer to the raw UTF-16
    data.
    
    The latter is still available via PyObject_AsReadBuffer().
    
    The patch also adds an optimization for string objects which is
    based on the fact that string objects return the raw character data
    for getreadbuffer access and are always single-segment.
    0afff388
getargs.c 28.9 KB