Skip to content

[3.9] Fix typos in the Objects directory (GH-28766) #28795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Objects/floatobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ _PyFloat_Pack8(double x, unsigned char *p, int le)
flo = 0;
++fhi;
if (fhi >> 28) {
/* And it also progagated out of the next 28 bits. */
/* And it also propagated out of the next 28 bits. */
fhi = 0;
++e;
if (e >= 2047)
Expand Down
2 changes: 1 addition & 1 deletion Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ safe_object_compare(PyObject *v, PyObject *w, MergeState *ms)
return PyObject_RichCompareBool(v, w, Py_LT);
}

/* Homogeneous compare: safe for any two compareable objects of the same type.
/* Homogeneous compare: safe for any two comparable objects of the same type.
* (ms->key_richcompare is set to ob_type->tp_richcompare in the
* pre-sort check.)
*/
Expand Down
2 changes: 1 addition & 1 deletion Objects/listsort.txt
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,6 @@ OPTIMIZATION OF INDIVIDUAL COMPARISONS
As noted above, even the simplest Python comparison triggers a large pile of
C-level pointer dereferences, conditionals, and function calls. This can be
partially mitigated by pre-scanning the data to determine whether the data is
homogenous with respect to type. If so, it is sometimes possible to
homogeneous with respect to type. If so, it is sometimes possible to
substitute faster type-specific comparisons for the slower, generic
PyObject_RichCompareBool.
2 changes: 1 addition & 1 deletion Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static int running_on_valgrind = -1;

/*
* Alignment of addresses returned to the user. 8-bytes alignment works
* on most current architectures (with 32-bit or 64-bit address busses).
* on most current architectures (with 32-bit or 64-bit address buses).
* The alignment value is also used for grouping small requests in size
* classes spaced ALIGNMENT bytes apart.
*
Expand Down
2 changes: 1 addition & 1 deletion Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ set_difference_update_internal(PySetObject *so, PyObject *other)

/* Optimization: When the other set is more than 8 times
larger than the base set, replace the other set with
interesection of the two sets.
intersection of the two sets.
*/
if ((PySet_GET_SIZE(other) >> 3) > PySet_GET_SIZE(so)) {
other = set_intersection(so, other);
Expand Down
4 changes: 2 additions & 2 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -7335,7 +7335,7 @@ PyUnicode_AsASCIIString(PyObject *unicode)
#endif

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

Expand Down
2 changes: 1 addition & 1 deletion PC/getpathp.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ extern const char *PyWin_DLLVersionString;
Returns NULL, or a pointer that should be freed.

XXX - this code is pretty strange, as it used to also
work on Win16, where the buffer sizes werent available
work on Win16, where the buffer sizes were not available
in advance. It could be simplied now Win16/Win32s is dead!
*/
static wchar_t *
Expand Down