[Pyrex] Inheriting from an externally defined extension type

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Feb 9 02:21:42 CET 2004


Konrad Hinsen <hinsen at cnrs-orleans.fr>:

> There is no "struct None" defined, so the C compiler complains.
> 
> A messge in the archive by Paul Prescod from January 14 proposes a patch for 
> this problem. After this patch, the above code becomes:
> 
> struct __pyx_vtabstruct_4spam_SpamAndEggs {
>   struct __pyx_vtabstruct_4spam_Spam __pyx_base;
>   PyObject *((*cook)(struct __pyx_obj_4spam_SpamAndEggs *));
> };
> 
> Unfortunately, struct __pyx_vtabstruct_4spam_Spam isn't defined either, 
> because Spam is not a class generated by Pyrex.

Pyrex shouldn't be generating the __pyx_base member at all
in this case, because the base class has no C methods
defined. I'll fix this next time I'm working on it.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list