mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)
This commit is contained in:
parent
3e0dd3730b
commit
8f87eefe7f
20 changed files with 38 additions and 37 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue