From 8f87eefe7f0576c05c488874eb9601a7a87c7312 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 12 Apr 2020 14:58:27 +0300 Subject: bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472) --- Modules/_cursesmodule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Modules/_cursesmodule.c') diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index ca6a89f1db..08991fd548 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); -- cgit v1.2.1