[Python-Dev] marshal (was:Buffer interface in abstract.c? )
David Ascher
da@ski.org
Tue, 17 Aug 1999 15:41:14 -0700 (Pacific Daylight Time)
On Mon, 16 Aug 1999, Jack Jansen wrote:
> Would adding a buffer interface to cobject solve your problem? Cobject is
> described as being used for passing C objects between Python modules, but I've
> always thought of it as passing C objects from one C routine to another C
> routine through Python, which doesn't necessarily understand what the object
> is all about.
>
> That latter description seems to fit your bill quite nicely.
It's an interesting idea, but it wouldn't do as it is, as I'd need the
ability to create a CObject given a memory location and a size. Also, I
am not expected to free() the memory, which would happen when the CObject
got GC'ed.
(BTW: I am *not* arguing that PyBuffer_FromReadWriteMemory() should be
exposed by default. I'm happy with exposing it in my little extension
module for my exotic needs.)
--david