Python provides PyUnicode_EncodeLocale(), but that returns a new bytes object. We can get a char* from that, but we'd not be able to delete the bytes object anymore, as we don't know the life time of the char* and our function only returns a char*
Python provides PyUnicode_ EncodeLocale( ), but that returns a new bytes object. We can get a char* from that, but we'd not be able to delete the bytes object anymore, as we don't know the life time of the char* and our function only returns a char*