0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.3.942

Problem:    Python: SEGV in Buffer functions.
Solution:   Call CheckBuffer() at the right time. (ZyX)
This commit is contained in:
Bram Moolenaar
2013-05-12 20:36:14 +02:00
parent 3d0c52db9c
commit 8f1723de47
4 changed files with 28 additions and 13 deletions

View File

@@ -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 = {