On Tue, 12 Aug 2008 21:43:49 +0200
Stefan Behnel <[EMAIL PROTECTED]> wrote:

> 
> Then I'm happy we fixed that bug already. :)
> 
> Stefan

OK, but i'm finding some more regressions in my code.


Here is a buffer class that compiles fine:


cdef class Buffer:

    cdef public char * data

    def __cinit__(self):

        self.data = NULL


But when i separate the definition into a pxd file i get this:


Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef class Buffer:


    def __cinit__(self):

        self.data = NULL
                   ^
------------------------------------------------------------

8:20: Cannot convert 'void *' to Python object

Here is the pxd file:


cdef class Buffer:

    cdef public char *data


If I do an strace, it seems cython does not find the pxd:

stat64(".../zap/zap.foo.pxd", 0xbfc81ee8) = -1 ENOENT (No such file or 
directory)
stat64(".../zap/zap/foo.pxd", 0xbfc81ee8) = -1 ENOENT (No such file or 
directory)
stat64(".../zap/zap/foo/__init__.pxd", 0xbfc81ee8) = -1 ENOENT (No such file or 
directory)

The current directory is zap, and this is the package in which foo lives.
So, the file is at .../zap/foo.pxd

I tried running cython from parent directory, and also from setup.py, and also 
build_ext --inplace.

lost,

Simon.

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to