Re: [Python-Dev] buffer interface for C extensions

2008-05-22 Thread Dan Lenski
On Thu, 22 May 2008 23:10:09 +0200, M.-A. Lemburg wrote: > On 2008-05-19 00:59, Dan Lenski wrote: > You should probably ask such questions on the capi-sig list. > > To answer your question: > > t# requires support for the read-only 8-bit character buffer interface > s# can use the read buffer in

Re: [Python-Dev] buffer interface for C extensions

2008-05-22 Thread M.-A. Lemburg
On 2008-05-19 00:59, Dan Lenski wrote: Hi all, I've written a small C extension to submit commands to SCSI devices via Linux's sg_io driver (for a camera hacking project). The extension is just a wrapper around a couple ioctl()'s with Pythonic exception handling thrown in. One of my extensi

Re: [Python-Dev] buffer interface for C extensions

2008-05-19 Thread Dan Lenski
On Sun, 18 May 2008 22:59:05 +, Dan Lenski wrote: > So here's what I don't understand. Why doesn't the "t#" argument > specifier support read-write buffers as well as read-only buffers? > Aren't read-write buffers a *superset* of read-only buffers?? Is there > something I'm doing wrong or a

[Python-Dev] buffer interface for C extensions

2008-05-18 Thread Dan Lenski
Hi all, I've written a small C extension to submit commands to SCSI devices via Linux's sg_io driver (for a camera hacking project). The extension is just a wrapper around a couple ioctl()'s with Pythonic exception handling thrown in. One of my extension methods is called like this from pytho