mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Add more const modifiers. (GH-26691)
This commit is contained in:
parent
9f1c5f6e8a
commit
be8b631b7a
9 changed files with 27 additions and 27 deletions
|
@ -1468,11 +1468,11 @@ parse_tz_str(PyObject *tz_str_obj, _tzrule *out)
|
|||
long std_offset = 1 << 20;
|
||||
long dst_offset = 1 << 20;
|
||||
|
||||
char *tz_str = PyBytes_AsString(tz_str_obj);
|
||||
const char *tz_str = PyBytes_AsString(tz_str_obj);
|
||||
if (tz_str == NULL) {
|
||||
return -1;
|
||||
}
|
||||
char *p = tz_str;
|
||||
const char *p = tz_str;
|
||||
|
||||
// Read the `std` abbreviation, which must be at least 3 characters long.
|
||||
Py_ssize_t num_chars = parse_abbr(p, &std_abbr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue