There was an error while loading. Please reload this page.
1 parent 2be2dd5 commit faea32bCopy full SHA for faea32b
2 files changed
Objects/stringlib/fastsearch.h
@@ -69,8 +69,8 @@ STRINGLIB(find_char)(const STRINGLIB_CHAR* s, Py_ssize_t n, STRINGLIB_CHAR ch)
69
and UCS4 representations. */
70
if (needle != 0) {
71
do {
72
- void *candidate = memchr(p, needle,
73
- (e - p) * sizeof(STRINGLIB_CHAR));
+ const void *candidate = memchr(p, needle,
+ (e - p) * sizeof(STRINGLIB_CHAR));
74
if (candidate == NULL)
75
return -1;
76
s1 = p;
Python/preconfig.c
@@ -584,7 +584,7 @@ _Py_get_xoption(const PyWideStringList *xoptions, const wchar_t *name)
584
for (Py_ssize_t i=0; i < xoptions->length; i++) {
585
const wchar_t *option = xoptions->items[i];
586
size_t len;
587
- wchar_t *sep = wcschr(option, L'=');
+ const wchar_t *sep = wcschr(option, L'=');
588
if (sep != NULL) {
589
len = (sep - option);
590
}
@@ -615,7 +615,7 @@ preconfig_init_utf8_mode(PyPreConfig *config, const _PyPreCmdline *cmdline)
615
const wchar_t *xopt;
616
xopt = _Py_get_xoption(&cmdline->xoptions, L"utf8");
617
if (xopt) {
618
- wchar_t *sep = wcschr(xopt, L'=');
+ const wchar_t *sep = wcschr(xopt, L'=');
619
if (sep) {
620
xopt = sep + 1;
621
if (wcscmp(xopt, L"1") == 0) {
0 commit comments