[Pyrex] Please support C++

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Oct 19 01:04:11 CEST 2005


David M. Cooke wrote:
> On Oct 18, 2005, at 17:59, Greg Ewing wrote:
> 
>>   object PyArray_ContiguousFromObject(object op, ...)
> 
> True enough, but that doesn't help: I can't cast it to ArrayType with  
> <ArrayType>, because PyObject * is used instead.

You shouldn't need to cast it at all; Pyrex should
accept assignment to something of type ArrayType
as-is.

The downside is that it will insert a runtime type
check that isn't really necessary. I'll have to think
some more about how to address that. Perhaps there
needs to be some way to declare that "this function
is declared in C as returning PyObject *, but it really
return something of type whatever".

Greg





More information about the Pyrex mailing list