8000 Fix typos in comments by xyb · Pull Request #120821 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Fix typos in comments #120821

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
Jun 24, 2024
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/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ intern_constants(PyObject *tuple, int *modified)
Py_DECREF(tmp);
}

// Intern non-string consants in the free-threaded build, but only if
// Intern non-string constants in the free-threaded build, but only if
// we are also immortalizing objects that use deferred reference
// counting.
PyThreadState *tstate = PyThreadState_GET();
Expand Down
2 changes: 1 addition & 1 deletion Objects/complexobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
* handles the case of no arguments and one positional argument, and calls
* complex_new(), implemented with Argument Clinic, to handle the remaining
* cases: 'real' and 'imag' arguments. This separation is well suited
* for different constructor roles: convering a string or number to a complex
* for different constructor roles: converting a string or number to a complex
* number and constructing a complex number from real and imaginary parts.
*/
static PyObject *
Expand Down
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,7 @@ dictiter_iternextitem_lock_held(PyDictObject *d, PyObject *self,
#ifdef Py_GIL_DISABLED

// Grabs the key and/or value from the provided locations and if successful
// returns them with an increased reference count. If either one is unsucessful
// returns them with an increased reference count. If either one is unsuccessful
// nothing is incref'd and returns -1.
static int
acquire_key_value(PyObject **key_loc, PyObject *value, PyObject **value_loc,
Expand Down
4 changes: 2 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ count_run(MergeState *ms, sortslice *slo, Py_ssize_t nremaining)
/* In general, as things go on we've established that the slice starts
with a monotone run of n elements, starting at lo. */

/* We're n elements into the slice, and the most recent neq+1 elments are
/* We're n elements into the slice, and the most recent neq+1 elements are
* all equal. This reverses them in-place, and resets neq for reuse.
*/
#define REVERSE_LAST_NEQ \
Expand Down Expand Up @@ -1918,7 +1918,7 @@ count_run(MergeState *ms, sortslice *slo, Py_ssize_t nremaining)
Py_ssize_t neq = 0;
for ( ; n < nremaining; ++n) {
IF_NEXT_SMALLER {
/* This ends the most recent run of equal elments, but still in
/* This ends the most recent run of equal elements, but still in
* the "descending" direction.
*/
REVERSE_LAST_NEQ
Expand Down
4 changes: 2 additions & 2 deletions Objects/mimalloc/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terms of the MIT license. A copy of the license can be found in the file

/* ----------------------------------------------------------------------------
Concurrent bitmap that can set/reset sequences of bits atomically,
represeted as an array of fields where each field is a machine word (`size_t`)
represented as an array of fields where each field is a machine word (`size_t`)

There are two api's; the standard one cannot have sequences that cross
between the bitmap fields (and a sequence must be <= MI_BITMAP_FIELD_BITS).
Expand Down Expand Up @@ -108,7 +108,7 @@ bool _mi_bitmap_try_find_from_claim(mi_bitmap_t bitmap, const size_t bitmap_fiel
return false;
}

// Like _mi_bitmap_try_find_from_claim but with an extra predicate that must be fullfilled
// Like _mi_bitmap_try_find_from_claim but with an extra predicate that must be fulfilled
bool _mi_bitmap_try_find_from_claim_pred(mi_bitmap_t bitmap, const size_t bitmap_fields,
const size_t start_field_idx, const size_t count,
mi_bitmap_pred_fun_t pred_fun, void* pred_arg,
Expand Down
2 changes: 1 addition & 1 deletion Objects/mimalloc/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void mi_heap_delete(mi_heap_t* heap)
if (heap==NULL || !mi_heap_is_initialized(heap)) return;

if (!mi_heap_is_backing(heap)) {
// tranfer still used pages to the backing heap
// transfer still used pages to the backing heap
mi_heap_absorb(heap->tld->heap_backing, heap);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ static int running_on_valgrind = -1;
typedef struct _obmalloc_state OMState;

/* obmalloc state for main interpreter and shared by all interpreters without
* their own obmalloc state. By not explicitly initalizing this structure, it
* their own obmalloc state. By not explicitly initializing this structure, it
* will be allocated in the BSS which is a small performance win. The radix
* tree arrays are fairly large but are sparsely used. */
static struct _obmalloc_state obmalloc_state_main;
Expand Down
2 changes: 1 addition & 1 deletion Objects/unicodeobject.c
67F4
Original file line number Diff line number Diff line change
Expand Up @@ -6245,7 +6245,7 @@ _PyUnicode_GetNameCAPI(void)
ucnhash_capi = (_PyUnicode_Name_CAPI *)PyCapsule_Import(
PyUnicodeData_CAPSULE_NAME, 1);

// It's fine if we overwite the value here. It's always the same value.
// It's fine if we overwrite the value here. It's always the same value.
_Py_atomic_store_ptr(&interp->unicode.ucnhash_capi, ucnhash_capi);
}
return ucnhash_capi;
Expand Down
Loading
0