[Python-Dev] An updated extended buffer PEP
Travis Oliphant
oliphant.travis at ieee.org
Wed Mar 28 06:32:26 CEST 2007
Carl Banks wrote:
> Travis E. Oliphant wrote:
>> I think we are getting closer. What do you think about Greg's idea
>> of basically making the provider the bufferinfo structure and having
>> the exporter handle copying memory over for shape and strides if it
>> wants to be able to change those before the lock is released.
>
> It seems like it's just a different way to return the data. You could
> do it by setting values through pointers, or do it by returning a
> structure. Which way you choose is a minor detail in my opinion. I'd
> probably favor returning the information in a structure.
>
> I would consider adding two fields to the structure:
>
> size_t structsize; /* size of the structure */
Why is this necessary? can't you get that by sizeof(bufferinfo)?
> PyObject* releaser; /* the object you need to call releasebuffer on */
Is this so that another object could be used to manage releases if desired?
-Travis
More information about the Python-Dev
mailing list