[Pyrex] ANN: Pyrex 0.9.6

Stefan Behnel stefan_ml at behnel.de
Sun Oct 7 20:25:48 CEST 2007


Alexander Belchenko wrote:
> However I have warning from MSVC compiler about types incompatibility
> in generated C-code:
> 
> bzrlib\_knit_load_data_c.c(1293) : warning C4133: 'function' : incompatible types - from 'PyObject
> *' to 'PyTypeObject *'
> 
> The C-code in question is inside auto-generated helper function __Pyx_Raise:
> 
>         #if PY_VERSION_HEX < 0x02050000
> 		...
>         #else
>             type = (PyObject*) type->ob_type;
>             Py_INCREF(type);
>             if (!PyType_IsSubtype(type, PyExc_BaseException)) {    // <<<<<<<<<<<<<

A cast to (PyTypeObject*) should work just fine here.

Stefan




More information about the Pyrex mailing list