This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petdance
Recipients petdance
Date 2020-02-11.04:45:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581396337.96.0.129945209612.issue39605@roundup.psfhosted.org>
In-reply-to
Content
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers.  Some of these can be safely modified, by either:

* Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

* Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts.
History
Date User Action Args
2020-02-11 04:45:38petdancesetrecipients: + petdance
2020-02-11 04:45:37petdancesetmessageid: <1581396337.96.0.129945209612.issue39605@roundup.psfhosted.org>
2020-02-11 04:45:37petdancelinkissue39605 messages
2020-02-11 04:45:37petdancecreate