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

@ -709,7 +709,7 @@ _curses_window_addstr_impl(PyCursesWindowObject *self, int group_left_1,
else
#endif
{
char *str = PyBytes_AS_STRING(bytesobj);
const char *str = PyBytes_AS_STRING(bytesobj);
funcname = "addstr";
if (use_xy)
rtn = mvwaddstr(self->win,y,x,str);
@ -792,7 +792,7 @@ _curses_window_addnstr_impl(PyCursesWindowObject *self, int group_left_1,
else
#endif
{
char *str = PyBytes_AS_STRING(bytesobj);
const char *str = PyBytes_AS_STRING(bytesobj);
funcname = "addnstr";
if (use_xy)
rtn = mvwaddnstr(self->win,y,x,str,n);
@ -1710,7 +1710,7 @@ _curses_window_insstr_impl(PyCursesWindowObject *self, int group_left_1,
else
#endif
{
char *str = PyBytes_AS_STRING(bytesobj);
const char *str = PyBytes_AS_STRING(bytesobj);
funcname = "insstr";
if (use_xy)
rtn = mvwinsstr(self->win,y,x,str);
@ -1795,7 +1795,7 @@ _curses_window_insnstr_impl(PyCursesWindowObject *self, int group_left_1,
else
#endif
{
char *str = PyBytes_AS_STRING(bytesobj);
const char *str = PyBytes_AS_STRING(bytesobj);
funcname = "insnstr";
if (use_xy)
rtn = mvwinsnstr(self->win,y,x,str,n);