[Python-Dev] PEP-298: buffer interface widening too much?
Martin v. Löwis
martin@v.loewis.de
15 Dec 2002 08:30:24 +0100
Todd Miller <jmiller@stsci.edu> writes:
> Point taken. What I'm really proposing is this:
Thanks for detailing this proposal. I now agree with your assumption
that missing release calls might cause problems; I'd expect that they
indeed will cause problems in many applications.
The main issue is the interaction with ParseTuple, the 's', 'w', and
't' converters invoke a buffer operation, after which (under your
proposal) the object is locked, there is no corresponding release
call, and no place to put such a call.
So, once you have passed an array to some C function expecting a
char*, you cannot extend the array anymore.
Regards,
Martin