| 1 |
From: Jack Jansen <[email protected]> |
| 2 |
To: [email protected] |
| 3 |
Subject: Re: [Python-Dev] Buffer interface in abstract.c? |
| 4 |
Date: Tue, 03 Aug 1999 11:53:39 +0200 |
| 5 |
Message-ID: <[email protected]> |
| 6 |
In-Reply-To: <[email protected]> |
| 7 |
MIME-Version: 1.0 |
| 8 |
Content-Type: multipart/mixed; boundary="===============6337740323128302028==" |
| 9 |
|
| 10 |
--===============6337740323128302028== |
| 11 |
Content-Type: text/plain; charset="utf-8" |
| 12 |
Content-Transfer-Encoding: 7bit |
| 13 |
|
| 14 |
Why not pass the index to the As*Buffer routines as well and make getsegcount |
| 15 |
available too? Then you could code things like |
| 16 |
for(i=0; i<PyObject_GetBufferCount(obj); i++) { |
| 17 |
if ( PyObject_AsCharBuffer(obj, &buf, &count, i) < 0 ) |
| 18 |
return -1; |
| 19 |
write(fp, buf, count); |
| 20 |
} |
| 21 |
|
| 22 |
-- |
| 23 |
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ |
| 24 |
Jack.Jansen(a)oratrix.com | ++++ if you agree copy these lines to your sig ++++ |
| 25 |
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
--===============6337740323128302028==-- |