diff --git a/Include/modsupport.h b/Include/modsupport.h index af995f567b004c..c4ced58ac30be0 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -20,7 +20,7 @@ PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...); PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list); #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030a0000 -// Add an attribute with name 'name' and value 'obj' to the module 'mod. +// Add an attribute with name 'name' and value 'value' to the module 'mod'. // On success, return 0. // On error, raise an exception and return -1. PyAPI_FUNC(int) PyModule_AddObjectRef(PyObject *mod, const char *name, PyObject *value); diff --git a/Python/getopt.c b/Python/getopt.c index 39a6938dec7663..55ae1fdf955cc5 100644 --- a/Python/getopt.c +++ b/Python/getopt.c @@ -62,7 +62,7 @@ int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex) wchar_t *ptr; wchar_t option; - if (*opt_ptr == '\0') { + if (*opt_ptr == L'\0') { if (_PyOS_optind >= argc) return -1; diff --git a/Python/initconfig.c b/Python/initconfig.c index 4db77ef47d2362..cc77b2330891be 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -2685,8 +2685,8 @@ config_parse_cmdline(PyConfig *config, PyWideStringList *warnoptions, return _PyStatus_NO_MEMORY(); } memcpy(command, _PyOS_optarg, (len - 2) * sizeof(wchar_t)); - command[len - 2] = '\n'; - command[len - 1] = 0; + command[len - 2] = L'\n'; + command[len - 1] = L'\0'; config->run_command = command; } break;