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/2011-August/112931.html below:

[Python-Dev] memoryview: "B", "c", "b" format specifiers

[Python-Dev] memoryview: "B", "c", "b" format specifiersAntoine Pitrou solipsis at pitrou.net
Thu Aug 18 22:53:06 CEST 2011
On Thu, 18 Aug 2011 18:57:00 +0200
Stefan Krah <stefan at bytereef.org> wrote:
> 
> Oh no, the name isn't quite right then. It should be a replacement
> for the combination PyBuffer_FillInfo()/PyMemoryView_FromBuffer()
> and it should temporarily wrap a C-string.

Ah, nice.

> PyObject * PyMemoryView_FromCString(char *s, Py_ssize_t size, int flags);

It's not really a C string, since it's not null-terminated.
PyMemoryView_FromMemory?

(that would mirror PyUnicode_FromUnicode, for example)

> 'flags' is just PyBUF_READ or PyBUF_WRITE.

Why do we have these in addition to PyBUF_WRITABLE already?

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