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

> Yes, Py_INCREF and Py_DECREF change the type, and therefore constness.

Understood. The changes that I have proposed are not to objects that get sent 
through Py_INCREF/Py_DECREF.  If they did, -Wcast-qual would have caught it.  
-Wcast-qual catches if you cast, say, a const char * to a char *.

Let's let this stay closed and I'll resubmit with a clearer ticket & PR.

----------

_______________________________________
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