Serhiy Storchaka added the comment: get_native_fmtstr() returns a pointer to C string literal. It is constant by its nature, and I thought it would be more clear to cast it explicitly if needed. It would be better (in particular for compatibility with C++) to make Py_buffer.format to be const char*, since it is borrowed reference to constant string, and often is initialized with string literal, but this is backward incompatible change of public API. I'm planning to open separate issue for backward-incompatible (controlled with a macro) constantness changing.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25923> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com