bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)

This commit is contained in:
Serhiy Storchaka 2020-04-12 14:58:27 +03:00 committed by GitHub
parent 3e0dd3730b
commit 8f87eefe7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 38 additions and 37 deletions

View file

@ -574,9 +574,9 @@ SplitObj(PyObject *arg)
else if (PyBytes_Check(arg)) {
int argc;
const char **argv;
char *list = PyBytes_AS_STRING(arg);
const char *list = PyBytes_AS_STRING(arg);
if (Tcl_SplitList((Tcl_Interp *)NULL, list, &argc, &argv) != TCL_OK) {
if (Tcl_SplitList((Tcl_Interp *)NULL, (char *)list, &argc, &argv) != TCL_OK) {
Py_INCREF(arg);
return arg;
}