[Cython] On cdef extern from syntax
Robert Bradshaw
robertwb at math.washington.edu
Wed Apr 20 21:08:20 CEST 2011
On Wed, Apr 20, 2011 at 11:08 AM, Fabrizio Milo aka misto
<mistobaan at gmail.com> wrote:
> Hi,
>
> I was wondering if has been ever discussed to implement the cython
> cdef extern from syntax as a with statement:
>
> with cython.header_importer("") as cy:
> cy.ctypedef(" unsigned int uint8 ")
> cy.cfunc( " void * myfunc() )")
>
> or also
>
> with cython.header_importer("") as cy:
> cy("""
> ctypdef ...
>
> """)
>
> Maybe there is already something like that ?
I don't think the with statement really makes sense here, as it is a
list of global declarations, and the with statement is all about
making something local to a block.
- Robert
More information about the cython-devel
mailing list