Re: [ctypes-users] copying/slicing ctypes arrays, (c_ulong *n)()
Brought to you by:
theller
From: Thomas H. <th...@py...> - 2005-02-02 21:07:55
|
RayS <ra...@bl...> writes: > Alternatively, do you expect to implement the acceptance of Python > objects which implement the buffer interface in the near future? I hope to be able to make a new release this or next week. So far, I think objects implementing the buffer interface should *not* be allowed as function parameters, but *buffer objects* should be. The reason is that the former would break too much code. IIUC, you should then be able to call buffer() on a Numeric array instance and pass that to a function, or call buffer() on the _data member of a Numarray array instance. The buffer() object has been changed in Python 2.4 (or was it even 2.3?) so that it retrieves the memory block address from the original object each time it is needed, instead of getting it once and then storing it permanently. So it should be even safe if the original object changes its internal memory block. Thomas |