[Python-Dev] Const-correctness in C-API Object Protocol

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Feb 23 00:08:01 CET 2011


On Mon, Feb 21, 2011 at 6:34 PM, David Claridge <daave at daave.com> wrote:
..
> I was wondering if there is some reason why C API functions like
> PyObject_CallMethod[1] and PySys_GetObject[2] take char* arguments
> rather than const char*s?

The later is addressed by issue 1699259
<http://bugs.python.org/issue1699259>.  It looks like const was added
in 3.2, but deemed not important enough to backport to 2.7.  The issue
is still open, so interested parties can argue for backport there.

The former (PyObject_CallMethod) is similarly subject of an open issue
in a commit review stage: <http://bugs.python.org/issue9369>.


More information about the Python-Dev mailing list