mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.8] closes bpo-39630: Update pointers to string literals to be const char *. (GH-18511)
(cherry picked from commit 7386a70746)
Co-authored-by: Andy Lester <andy@petdance.com>
This commit is contained in:
parent
28fc1bac0f
commit
0d860dd43c
3 changed files with 4 additions and 4 deletions
|
|
@ -11,10 +11,10 @@ static PyObject *gen_close(PyGenObject *, PyObject *);
|
|||
static PyObject *async_gen_asend_new(PyAsyncGenObject *, PyObject *);
|
||||
static PyObject *async_gen_athrow_new(PyAsyncGenObject *, PyObject *);
|
||||
|
||||
static char *NON_INIT_CORO_MSG = "can't send non-None value to a "
|
||||
static const char *NON_INIT_CORO_MSG = "can't send non-None value to a "
|
||||
"just-started coroutine";
|
||||
|
||||
static char *ASYNC_GEN_IGNORED_EXIT_MSG =
|
||||
static const char *ASYNC_GEN_IGNORED_EXIT_MSG =
|
||||
"async generator ignored GeneratorExit";
|
||||
|
||||
static inline int
|
||||
|
|
|
|||
|
|
@ -1415,7 +1415,7 @@ static PyObject *surrogateescape_errors(PyObject *self, PyObject *exc)
|
|||
static int _PyCodecRegistry_Init(void)
|
||||
{
|
||||
static struct {
|
||||
char *name;
|
||||
const char *name;
|
||||
PyMethodDef def;
|
||||
} methods[] =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ PyErr_SetFromErrnoWithFilenameObjects(PyObject *exc, PyObject *filenameObject, P
|
|||
|
||||
#ifndef MS_WINDOWS
|
||||
if (i != 0) {
|
||||
char *s = strerror(i);
|
||||
const char *s = strerror(i);
|
||||
message = PyUnicode_DecodeLocale(s, "surrogateescape");
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue