[issue32240] Add the const qualifier for PyObject* array arguments

Serhiy Storchaka report at bugs.python.org
Thu Dec 7 07:24:50 EST 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This change is inspired by reviewing one PR in which an input array of PyObject* was modified inplace. Even if it was correct in that particular  case, it looked unsafe (actually that code was wrong for other causes). Adding the const qualifier allows to distinguish input PyObject* array arguments from pointers to output PyObject* arguments.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32240>
_______________________________________


More information about the Python-bugs-list mailing list