Skip to content

Commit 960e7b3

Browse files
authored
[3.9] Fix typos in the Objects directory (GH-28766) (GH-28795)
(cherry picked from commit 5f401f1) Automerge-Triggered-By: GH:JulienPalard
1 parent 71d56a7 commit 960e7b3

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

Objects/floatobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,7 +2291,7 @@ _PyFloat_Pack8(double x, unsigned char *p, int le)
22912291
flo = 0;
22922292
++fhi;
22932293
if (fhi >> 28) {
2294-
/* And it also progagated out of the next 28 bits. */
2294+
/* And it also propagated out of the next 28 bits. */
22952295
fhi = 0;
22962296
++e;
22972297
if (e >= 2047)

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ safe_object_compare(PyObject *v, PyObject *w, MergeState *ms)
20122012
return PyObject_RichCompareBool(v, w, Py_LT);
20132013
}
20142014

2015-
/* Homogeneous compare: safe for any two compareable objects of the same type.
2015+
/* Homogeneous compare: safe for any two comparable objects of the same type.
20162016
* (ms->key_richcompare is set to ob_type->tp_richcompare in the
20172017
* pre-sort check.)
20182018
*/

Objects/listsort.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,6 @@ OPTIMIZATION OF INDIVIDUAL COMPARISONS
758758
As noted above, even the simplest Python comparison triggers a large pile of
759759
C-level pointer dereferences, conditionals, and function calls. This can be
760760
partially mitigated by pre-scanning the data to determine whether the data is
761-
homogenous with respect to type. If so, it is sometimes possible to
761+
homogeneous with respect to type. If so, it is sometimes possible to
762762
substitute faster type-specific comparisons for the slower, generic
763763
PyObject_RichCompareBool.

Objects/obmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static int running_on_valgrind = -1;
836836

837837
/*
838838
* Alignment of addresses returned to the user. 8-bytes alignment works
839-
* on most current architectures (with 32-bit or 64-bit address busses).
839+
* on most current architectures (with 32-bit or 64-bit address buses).
840840
* The alignment value is also used for grouping small requests in size
841841
* classes spaced ALIGNMENT bytes apart.
842842
*

Objects/setobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ set_difference_update_internal(PySetObject *so, PyObject *other)
14101410

14111411
/* Optimization: When the other set is more than 8 times
14121412
larger than the base set, replace the other set with
1413-
interesection of the two sets.
1413+
intersection of the two sets.
14141414
*/
14151415
if ((PySet_GET_SIZE(other) >> 3) > PySet_GET_SIZE(so)) {
14161416
other = set_intersection(so, other);

Objects/unicodeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7335,7 +7335,7 @@ PyUnicode_AsASCIIString(PyObject *unicode)
73357335
#endif
73367336

73377337
/* INT_MAX is the theoretical largest chunk (or INT_MAX / 2 when
7338-
transcoding from UTF-16), but INT_MAX / 4 perfoms better in
7338+
transcoding from UTF-16), but INT_MAX / 4 performs better in
73397339
both cases also and avoids partial characters overrunning the
73407340
length limit in MultiByteToWideChar on Windows */
73417341
#define DECODING_CHUNK_SIZE (INT_MAX/4)
@@ -16121,7 +16121,7 @@ init_fs_codec(PyInterpreterState *interp)
1612116121
_Py_error_handler error_handler;
1612216122
error_handler = get_error_handler_wide(config->filesystem_errors);
1612316123
if (error_handler == _Py_ERROR_UNKNOWN) {
16124-
PyErr_SetString(PyExc_RuntimeError, "unknow filesystem error handler");
16124+
PyErr_SetString(PyExc_RuntimeError, "unknown filesystem error handler");
1612516125
return -1;
1612616126
}
1612716127

PC/getpathp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ extern const char *PyWin_DLLVersionString;
332332
Returns NULL, or a pointer that should be freed.
333333
334334
XXX - this code is pretty strange, as it used to also
335-
work on Win16, where the buffer sizes werent available
335+
work on Win16, where the buffer sizes were not available
336336
in advance. It could be simplied now Win16/Win32s is dead!
337337
*/
338338
static wchar_t *

0 commit comments

Comments
 (0)