Author: Armin Rigo <ar...@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 = { _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit