Mercurial > vim
comparison src/if_python3.c @ 21190:10eb6c38938c v8.2.1146
patch 8.2.1146: not enough testing for Python
Commit: https://github.com/vim/vim/commit/ab5894638413748fcedfe28691e6c27893924520
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 6 21:03:06 2020 +0200
patch 8.2.1146: not enough testing for Python
Problem: Not enough testing for Python.
Solution: Add more tests. Fix uncovered problems. (Yegappan Lakshmanan,
closes #6392)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Jul 2020 21:15:05 +0200 |
parents | 4acb165ed0bc |
children | 8488d9cc3ccd |
comparison
equal
deleted
inserted
replaced
21189:86a6df062aea | 21190:10eb6c38938c |
---|---|
1254 BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val) | 1254 BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val) |
1255 { | 1255 { |
1256 if (PyLong_Check(idx)) | 1256 if (PyLong_Check(idx)) |
1257 { | 1257 { |
1258 long n = PyLong_AsLong(idx); | 1258 long n = PyLong_AsLong(idx); |
1259 | |
1260 if (CheckBuffer((BufferObject *) self)) | |
1261 return -1; | |
1262 | |
1259 return RBAsItem((BufferObject *)(self), n, val, 1, | 1263 return RBAsItem((BufferObject *)(self), n, val, 1, |
1260 (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, | 1264 (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, |
1261 NULL); | 1265 NULL); |
1262 } else if (PySlice_Check(idx)) | 1266 } else if (PySlice_Check(idx)) |
1263 { | 1267 { |