mirror of
https://github.com/python/cpython.git
synced 2025-08-25 19:24:42 +00:00
[3.9] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28512)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 8f943ca257
)
Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
This commit is contained in:
parent
09390c837a
commit
5482db5800
27 changed files with 43 additions and 44 deletions
|
@ -10867,7 +10867,7 @@ replace(PyObject *self, PyObject *str1,
|
|||
release1 = 1;
|
||||
}
|
||||
/* new_size = PyUnicode_GET_LENGTH(self) + n * (PyUnicode_GET_LENGTH(str2) -
|
||||
PyUnicode_GET_LENGTH(str1))); */
|
||||
PyUnicode_GET_LENGTH(str1)); */
|
||||
if (len1 < len2 && len2 - len1 > (PY_SSIZE_T_MAX - slen) / n) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue