[Cython] Best way to fake buffers in Py2?
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Wed Jul 2 11:02:03 CEST 2008
Dag Sverre Seljebotn wrote:
> And then generate a pyx-file-specific local PyObject_GetBuffer depending
> on the __cython_py2_buffer__ we can find:
>
> #ifdef Py2
> static int PyObject_GetBuffer(PyObject *, Py_buffer *, int);
> #endif
>
> ... code using PyObject_GetBuffer ...
>
> #ifdef Py2
> PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view,
> int flags) {
Sorry, this should have been declared static int as well.
--
Dag Sverre
More information about the Cython-dev
mailing list