[pypy-commit] cffi default: Ah, on http://bugs.python.org/issue21778 I got the answer as to what
arigo
noreply at buildbot.pypy.org
Mon Jun 16 17:15:43 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1514:f27ffac380dc
Date: 2014-06-16 17:15 +0200
http://bitbucket.org/cffi/cffi/changeset/f27ffac380dc/
Log: Ah, on http://bugs.python.org/issue21778 I got the answer as to what
the expected way to call this is.
diff --git a/c/minibuffer.h b/c/minibuffer.h
--- a/c/minibuffer.h
+++ b/c/minibuffer.h
@@ -105,12 +105,9 @@
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 = {
More information about the pypy-commit
mailing list