• Neal Norwitz's avatar
    As discussed on python-dev, really fix the PyMem_*/PyObject_* memory API · 08062d66
    Neal Norwitz yazdı
    mismatches.  At least I hope this fixes them all.
    
    This reverts part of my change from yesterday that converted everything
    in Parser/*.c to use PyObject_* API.  The encoding doesn't really need
    to use PyMem_*, however, it uses new_string() which must return PyMem_*
    for handling the result of PyOS_Readline() which returns PyMem_* memory.
    
    If there were 2 versions of new_string() one that returned PyMem_*
    for tokens and one that return PyObject_* for encodings that could
    also fix this problem.  I'm not sure which version would be clearer.
    This seems to fix both Guido's and Phillip's problems, so it's good enough
    for now.  After this change, it would be good to review Parser/*.c
    for consistent use of the 2 memory APIs.
    08062d66
myreadline.c 5.41 KB