]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in comments (#120821)
authorXie Yanbo <xieyanbo@gmail.com>
Mon, 24 Jun 2024 17:47:00 +0000 (01:47 +0800)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 17:47:00 +0000 (19:47 +0200)
Objects/codeobject.c
Objects/complexobject.c
Objects/dictobject.c
Objects/listobject.c
Objects/mimalloc/bitmap.c
Objects/mimalloc/heap.c
Objects/obmalloc.c
Objects/unicodeobject.c

index 4be17708d3aab71b11aa2305e152c1a4423a1f5a..7493280c898750dcdb382e0ed7e2f682b9255bae 100644 (file)
@@ -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();
index a8be266970afd0a1dc51af928bec1aa2fc69cc83..7b62fe30b2b00722f4c77f306c062ba972dcfabc 100644 (file)
@@ -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 *
index 51cfdf1c4d8c55598cd945377f67fc51abdb880a..5529e527d8bea3b91e37d3f73f0be94bf4e94ad6 100644 (file)
@@ -5383,7 +5383,7 @@ fail:
 #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,
index dc9df3c3614fb4c7c94da16de833a0f051f95d1b..9eae9626f7c1f160e8436b06566142db68ae0b01 100644 (file)
@@ -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                        \
@@ -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
index ec3c755822dac1c02d5c7b7188b1285c47db42a3..31830756f58c7c03edacec6ce65a6ee0cf6e8d19 100644 (file)
@@ -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).
@@ -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,
index 26777f39fb6aa56978761bdf3e2229f553a0f747..d92dc768e5ec284c4c0508210b0aeb5a0875a097 100644 (file)
@@ -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 {
index 4fe195b63166c17410d06415ad5deb1df77cb5d1..d033e2bad1891a927158470f9e710097cc5f7c82 100644 (file)
@@ -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;
index 0710c6286c80dad53000bff897c11bf009a46605..acdec61cfdb4115acbfd18c3208bd69a5999b7a6 100644 (file)
@@ -6297,7 +6297,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;