summaryrefslogtreecommitdiff
path: root/c/minibuffer.h
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2014-06-16 17:15:43 +0200
committerArmin Rigo <arigo@tunes.org>2014-06-16 17:15:43 +0200
commit5ede874ad0ab213a0794dcc151b71bf559587a45 (patch)
treee5c3c0e984b043311688febc85a75965135e8c91 /c/minibuffer.h
parent72e60a15d3638f90bb13810533e991a2f0ca656d (diff)
downloadcffi-5ede874ad0ab213a0794dcc151b71bf559587a45.tar.gz
Ah, on http://bugs.python.org/issue21778 I got the answer as to what
the expected way to call this is.
Diffstat (limited to 'c/minibuffer.h')
-rw-r--r--c/minibuffer.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/c/minibuffer.h b/c/minibuffer.h
index 6d3eae5..92cf079 100644
--- a/c/minibuffer.h
+++ b/c/minibuffer.h
@@ -105,12 +105,9 @@ static PyObject *mb_str(MiniBufferObj *self)
static int mb_getbuf(MiniBufferObj *self, Py_buffer *view, int flags)
{
- static Py_ssize_t dummy_stride = 1;
- int res = PyBuffer_FillInfo(view, (PyObject *)self,
- self->mb_data, self->mb_size,
- /*readonly=*/0, PyBUF_CONTIG | PyBUF_FORMAT);
- view->strides = &dummy_stride;
- return res;
+ return PyBuffer_FillInfo(view, (PyObject *)self,
+ self->mb_data, self->mb_size,
+ /*readonly=*/0, flags);
}
static PySequenceMethods mb_as_sequence = {