Skip to content

Commit dcfbe4f

Browse files
authored
[3.10] Fix typos in the Objects directory (GH-28766) (GH-28797)
(cherry picked from commit 5f401f1) Automerge-Triggered-By: GH:JulienPalard
1 parent f679839 commit dcfbe4f

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

Objects/floatobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,7 +2350,7 @@ _PyFloat_Pack8(double x, unsigned char *p, int le)
23502350
flo = 0;
23512351
++fhi;
23522352
if (fhi >> 28) {
2353-
/* And it also progagated out of the next 28 bits. */
2353+
/* And it also propagated out of the next 28 bits. */
23542354
fhi = 0;
23552355
++e;
23562356
if (e >= 2047)

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ safe_object_compare(PyObject *v, PyObject *w, MergeState *ms)
20242024
return PyObject_RichCompareBool(v, w, Py_LT);
20252025
}
20262026

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

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
@@ -1407,7 +1407,7 @@ set_difference_update_internal(PySetObject *so, PyObject *other)
14071407

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

Objects/unicodeobject.c

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

74757475
/* INT_MAX is the theoretical largest chunk (or INT_MAX / 2 when
7476-
transcoding from UTF-16), but INT_MAX / 4 perfoms better in
7476+
transcoding from UTF-16), but INT_MAX / 4 performs better in
74777477
both cases also and avoids partial characters overrunning the
74787478
length limit in MultiByteToWideChar on Windows */
74797479
#define DECODING_CHUNK_SIZE (INT_MAX/4)
@@ -16149,7 +16149,7 @@ init_fs_codec(PyInterpreterState *interp)
1614916149
_Py_error_handler error_handler;
1615016150
error_handler = get_error_handler_wide(config->filesystem_errors);
1615116151
if (error_handler == _Py_ERROR_UNKNOWN) {
16152-
PyErr_SetString(PyExc_RuntimeError, "unknow filesystem error handler");
16152+
PyErr_SetString(PyExc_RuntimeError, "unknown filesystem error handler");
1615316153
return -1;
1615416154
}
1615516155

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 *

Parser/tokenizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum interactive_underflow_t {
2323
/* Normal mode of operation: return a new token when asked in interactie mode */
2424
IUNDERFLOW_NORMAL,
2525
/* Forcefully return ENDMARKER when asked for a new token in interactive mode. This
26-
* can be used to prevent the tokenizer to promt the user for new tokens */
26+
* can be used to prevent the tokenizer to prompt the user for new tokens */
2727
IUNDERFLOW_STOP,
2828
};
2929

0 commit comments

Comments
 (0)