Andy Lester <a...@petdance.com> added the comment:

I'm sorry, I think my comment was misleading.

The changes I had proposed were not making the object itself const, but some of 
the arguments in the static worker functions.  For example:

-tb_displayline(PyObject *f, PyObject *filename, int lineno, PyObject *name)
+tb_displayline(PyObject *f, PyObject *filename, int lineno, const PyObject 
*name)

and

-tb_printinternal(PyTracebackObject *tb, PyObject *f, long limit)
+tb_printinternal(const PyTracebackObject *tb, PyObject *f, long limit)

I've got -Wincompatible-pointer-types-discards-qualifiers and -Wcast-qual 
turned on, and no errors occur.

Is there somewhere in the deep internals of the Python macros where constness 
can be changed but the compiler isn't reporting on it?

Thanks,
Andy

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to