[Pyrex] Please support C++

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 18 03:38:27 CEST 2005


Lenard Lindstrom wrote:

> Pyrex has code to 
> ensure all such pointers are (PyObject *). I took out that restriction to allow 
> temporary pointers to extension types to be of the type of the extension type. 
 >
 > Does removing the restriction re-introduce some kind of bug?

It looks like the code for managing temps of different
types is intact, so there shouldn't be any problem.

As far as I remember, the main reason for making all the
temps PyObject * was that they are very frequently passed
to Python/C API functions, and doing things that way
minimised the total amount of casting going on in the
generated code, making it easier for me to see whether
it was correct.

Another reason is that it maximises the amount of
re-use of temps that is possible, although that's
probably not a big concern.

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



More information about the Pyrex mailing list