[Cython] bitten by const

Stefan Behnel stefan_ml at behnel.de
Mon Apr 14 17:10:33 CEST 2008


Lisandro Dalcin wrote:
> Is there a way to handle a call to this guy, regarding current Cython
> limitations about const?
> 
> int PyObject_AsReadBuffer (PyObject*, const void**, Py_ssize_t*)

You want to call that function? Then declare it

  cdef extern from "Python.h":
    cdef int PyObject_AsReadBuffer (PyObject* a, void** b, Py_ssize_t* c)

Doesn't that work?

Stefan



More information about the Cython-dev mailing list