[issue25923] More const char

Serhiy Storchaka report at bugs.python.org
Fri Dec 25 15:10:04 EST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue25923>
_______________________________________


More information about the Python-bugs-list mailing list