diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-04-12 11:58:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-12 11:58:27 (GMT) |
commit | 8f87eefe7f0576c05c488874eb9601a7a87c7312 (patch) | |
tree | 10ea36d1f702ae9e8bc34bcc88588868706948f6 /Modules/_cursesmodule.c | |
parent | 3e0dd3730b5eff7e9ae6fb921aa77cd26efc9e3a (diff) | |
download | cpython-8f87eefe7f0576c05c488874eb9601a7a87c7312.zip cpython-8f87eefe7f0576c05c488874eb9601a7a87c7312.tar.gz cpython-8f87eefe7f0576c05c488874eb9601a7a87c7312.tar.bz2 |
bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index ca6a89f..08991fd 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -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); |