Mercurial > vim
diff src/if_python.c @ 4387:358c10968c7f v7.3.942
updated for version 7.3.942
Problem: Python: SEGV in Buffer functions.
Solution: Call CheckBuffer() at the right time. (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 12 May 2013 20:36:14 +0200 |
parents | da71e66dc1d4 |
children | 80eea7a9d6b9 |
line wrap: on
line diff
--- a/src/if_python.c +++ b/src/if_python.c @@ -1073,17 +1073,13 @@ BufferGetattr(PyObject *self, char *name static PyInt BufferAssItem(PyObject *self, PyInt n, PyObject *val) { - return RBAsItem((BufferObject *)(self), n, val, 1, - (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, - NULL); + return RBAsItem((BufferObject *)(self), n, val, 1, -1, NULL); } static PyInt BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) { - return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, - (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, - NULL); + return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, -1, NULL); } static PySequenceMethods RangeAsSeq = {