[Pyrex] casting warning

Lenard Lindstrom len-l at telus.net
Fri Dec 16 05:10:16 CET 2005


The second C++ patch for Pyrex 0.9.3.1 removes the warning. It can be 
use without the first C++ patch if C++ support is not needed. The 
patch can be found at the Pyrex home page.

Lenard Lindstrom
<len-l at telus.net>

On 15 Dec 2005 at 1:13, Eric Huss wrote:

> The following snippet of code generates warnings when compiled by gcc:
> 
> cdef class A:
> 
>     cdef foo(self):
>         print 'A.foo'
> 
> cdef class B(A):
> 
>     cdef foo(self):
>         print 'B.foo'
> 
> test.c: In function `__pyx_tp_new_4test_B':
> test.c:267: warning: assignment from incompatible pointer type
> 
> 
> This only happens when you subclass something that has a cdef function and
> redefine it.  It seems benign, but I as wondering if anyone has figured
> out a fix.  It looks like the cast for the vtable assignment is simply
> using the wrong type (perhaps should be using its base_type?).




More information about the Pyrex mailing list