[Numpy-discussion] Array Protocol change for Python 2.6 (original) (raw)

Francesc Altet faltet at carabos.com
Fri Jun 16 15:35:24 EDT 2006


A Divendres 16 Juny 2006 21:25, Thomas Heller va escriure:

Robert Kern wrote: > Like how Win64 uses 32-bit longs and 64-bit pointers. And then there's > signedness. Please don't use Python ints to encode pointers. Holding > arbitrary pointers is the job of CObjects.

(Sorry, I'm late in reading this thread. I didn't know there were so many numeric groups) Python has functions to convert pointers to int/long and vice versa: PyIntFromVoidPtr() and PyIntAsVoidPtr(). ctypes uses them, ctypes also represents addresses as ints/longs.

Very interesting. So, may I suggest to use this capability to represent addresses? I think this would simplify things (specially it will prevent to use ascii/pointer conversions, which are ugly to my mind).

Cheers,

--

0,0< Francesc Altet     http://www.carabos.com/ V V Cárabos Coop. V.   Enjoy Data "-"



More information about the NumPy-Discussion mailing list