• Marc-André Lemburg's avatar
    This patch adds a new Python C API called PyString_AsStringAndSize() · d1ba4432
    Marc-André Lemburg authored
    which implements the automatic conversion from Unicode to a string
    object using the default encoding.
    
    The new API is then put to use to have eval() and exec accept
    Unicode objects as code parameter. This closes bugs #110924
    and #113890.
    
    As side-effect, the traditional C APIs PyString_Size() and
    PyString_AsString() will also accept Unicode objects as
    parameters.
    d1ba4432
test_b1.py 17 KB