Can Py_buffer format be const qualified?
Discussions on Python.org
Can Py_buffer format be const qualified?
The char *format of a Py_buffer is often set to a string literal such as "B" or "d". For example, see get_native_fmtstr() in Objects/memoryobject.c, which is used to set view->format. These strings cannot be modified in memory. Since C++11, string literals are not convertible or assignable to non-const char*, which makes setting format unpleasant for those programming in C++. Would it be possible to change to const char *format? By the way, PEP 3118 had the const qualifier…
0 comments
No comments yet.