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/084168.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_bufferAntoine Pitrou solipsis at pitrou.net
Tue Dec 9 15:56:42 CET 2008
Antoine Pitrou <solipsis <at> pitrou.net> writes:
> 
> > The first is that memoryview is treating the len field in the
> > Py_buffer struct as the number of objects in the view in a few places
> > instead of as the total number of bytes being exposed (it is actually
> > the latter, as defined in PEP 3118).
> 
> I don't understand the difference between "the number of objects in the
> view" and "the total number of bytes being exposed". For me it should be
> the same and the "buf" and "len" fields in the Py_buffer should be
> usable by any other C function, otherwise they are useless.

Sorry, I had misread your message. Yes, indeed "len" should the number of bytes,
not the number of objects. This is also solved as part of the patch I proposed
in the aforementioned bug entry.

Regards

Antoine.


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