gh-123378: fix post-merge typos in comments and NEWS (#127739)

This commit is contained in:
Bénédikt Tran 2024-12-08 14:47:22 +01:00 committed by GitHub
parent 1503fc8f88
commit 8fa5ecec01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
Ensure that the value of :attr:`UnicodeEncodeError.start <UnicodeError.start>`
retrieved by :c:func:`PyUnicodeEncodeError_GetStart` lie in
retrieved by :c:func:`PyUnicodeEncodeError_GetStart` lies in
``[0, max(0, objlen - 1)]`` where *objlen* is the length of
:attr:`UnicodeEncodeError.object <UnicodeError.object>`. Similar
arguments apply to :exc:`UnicodeDecodeError` and :exc:`UnicodeTranslateError`

View file

@ -2712,7 +2712,7 @@ set_unicodefromstring(PyObject **attr, const char *value)
* Adjust the (inclusive) 'start' value of a UnicodeError object.
*
* The 'start' can be negative or not, but when adjusting the value,
* we clip it in [0, max(0, objlen - 1)] but do not intepret it as
* we clip it in [0, max(0, objlen - 1)] and do not interpret it as
* a relative offset.
*/
static inline Py_ssize_t
@ -2732,8 +2732,8 @@ unicode_error_adjust_start(Py_ssize_t start, Py_ssize_t objlen)
* Adjust the (exclusive) 'end' value of a UnicodeError object.
*
* The 'end' can be negative or not, but when adjusting the value,
* we clip it in [min(1, objlen), max(min(1, objlen), objlen)] but
* do not intepret it as a relative offset.
* we clip it in [min(1, objlen), max(min(1, objlen), objlen)] and
* do not interpret it as a relative offset.
*/
static inline Py_ssize_t
unicode_error_adjust_end(Py_ssize_t end, Py_ssize_t objlen)