A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084184.html below:

[Python-Dev] Allocation of shape and strides fields in Py_buffer

[Python-Dev] Allocation of shape and strides fields in Py_buffer [Python-Dev] Allocation of shape and strides fields in Py_bufferGreg Ewing greg.ewing at canterbury.ac.nz
Tue Dec 9 23:54:08 CET 2008
Nick Coghlan wrote:

> [from the PEP] "If the exporter wants to be able to change an
> object's shape, strides, and/or suboffsets before releasebuffer is
> called then it should allocate those arrays when getbuffer is called
> (pointing to them in the buffer-info structure provided) and free them
> when releasebuffer is called."

Even allowing this seems rather dubious to me. I suppose
there's no serious danger as long as the block of memory
ultimately holding the data doesn't move or change size,
but changing the shape could confuse a buffer user that's
iterating over the data.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4