S
sjdevnull
[Any python/C interface gurus please correct me if my understanding is
wrong, as this fix is slated for inclusion in future versions of
vim--thanks!]
Just as a heads up for anyone building vim with python2.5 as the
extension language:
Simple solution: Python 2.5 has tightened up how it does memory
allocation, so you need to ":%s/PyMem_DEL/Py_DECREF" in if_python.c or
you'll see segfaults when trying to use y or yf statements.
Longer explantation: Every instance of PyMem_DEL in if_python.c is on a
standard PyObject * allocated with Py_BuildValue or similar.
If I understand correctly, really, PyMem_DEL is only supposed to be
paired with PyMem_ALLOC and any PyObject * objects should be freed with
Py_DECREF. But in earlier versions the two internally used the same
allocater so it happened to work; Python 2.5 is stricter about this.
I've only tested with vim 7.0 and python 2.3 and 2.5, but the same
change should work fine in older versions of vim.
The fix has been sent to Bram so future versions of vim should build
fine out of the box against python 2.5.
wrong, as this fix is slated for inclusion in future versions of
vim--thanks!]
Just as a heads up for anyone building vim with python2.5 as the
extension language:
Simple solution: Python 2.5 has tightened up how it does memory
allocation, so you need to ":%s/PyMem_DEL/Py_DECREF" in if_python.c or
you'll see segfaults when trying to use y or yf statements.
Longer explantation: Every instance of PyMem_DEL in if_python.c is on a
standard PyObject * allocated with Py_BuildValue or similar.
If I understand correctly, really, PyMem_DEL is only supposed to be
paired with PyMem_ALLOC and any PyObject * objects should be freed with
Py_DECREF. But in earlier versions the two internally used the same
allocater so it happened to work; Python 2.5 is stricter about this.
I've only tested with vim 7.0 and python 2.3 and 2.5, but the same
change should work fine in older versions of vim.
The fix has been sent to Bram so future versions of vim should build
fine out of the box against python 2.5.