]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] Fix typos in comments (GH-120481) (#120774)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 20 Jun 2024 03:40:54 +0000 (05:40 +0200)
committerGitHub <noreply@github.com>
Thu, 20 Jun 2024 03:40:54 +0000 (03:40 +0000)
(cherry picked from commit 656a1c81083b76b9d998c983f4329348a65985d3)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
Include/internal/pycore_frame.h
Include/internal/pycore_gc.h
Python/qsbr.c
Python/specialize.c

index 994900c007f4bd014ab733e1490ba2b749fb0b04..e4eb893263c42c878311a56fe4bd9279e41b06e7 100644 (file)
@@ -214,7 +214,7 @@ _PyFrame_MakeAndSetFrameObject(_PyInterpreterFrame *frame);
 
 /* Gets the PyFrameObject for this frame, lazily
  * creating it if necessary.
- * Returns a borrowed referennce */
+ * Returns a borrowed reference */
 static inline PyFrameObject *
 _PyFrame_GetFrameObject(_PyInterpreterFrame *frame)
 {
index ba8b8e1903f30759d8c3dc1d110495faac9dad1e..28e34d3809634c51caa707dd44942db6f8f60b3f 100644 (file)
@@ -346,7 +346,7 @@ struct _gc_runtime_state {
     Py_ssize_t long_lived_pending;
 
     /* gh-117783: Deferred reference counting is not fully implemented yet, so
-       as a temporary measure we treat objects using deferred referenence
+       as a temporary measure we treat objects using deferred reference
        counting as immortal. The value may be zero, one, or a negative number:
         0: immortalize deferred RC objects once the first thread is created
         1: immortalize all deferred RC objects immediately
index a7321154a62ffc837f343c2a77a1f754cb894649..a40219acfe2c29463b45b8a49902f59c30760eeb 100644 (file)
@@ -2,7 +2,7 @@
  * Implementation of safe memory reclamation scheme using
  * quiescent states.
  *
- * This is dervied from the "GUS" safe memory reclamation technique
+ * This is derived from the "GUS" safe memory reclamation technique
  * in FreeBSD written by Jeffrey Roberson. It is heavily modified. Any bugs
  * in this code are likely due to the modifications.
  *
@@ -238,7 +238,7 @@ _Py_qsbr_unregister(PyThreadState *tstate)
     struct _PyThreadStateImpl *tstate_imp = (_PyThreadStateImpl*) tstate;
 
     // gh-119369: GIL must be released (if held) to prevent deadlocks, because
-    // we might not have an active tstate, which means taht blocking on PyMutex
+    // we might not have an active tstate, which means that blocking on PyMutex
     // locks will not implicitly release the GIL.
     assert(!tstate->_status.holds_gil);
 
index 9ac428c3593f563c1d2e5cc4b553b63a2f5fa615..973baf2fbdc69081d9d29b3471e820ec6dd8633b 100644 (file)
@@ -1301,7 +1301,7 @@ PyObject *descr, DescriptorClassification kind, bool is_method)
             }
             /* Cache entries must be unsigned values, so we offset the
              * dictoffset by MANAGED_DICT_OFFSET.
-             * We do the reverese offset in LOAD_ATTR_METHOD_LAZY_DICT */
+             * We do the reverse offset in LOAD_ATTR_METHOD_LAZY_DICT */
             dictoffset -= MANAGED_DICT_OFFSET;
             assert(((uint16_t)dictoffset) == dictoffset);
             cache->dict_offset = (uint16_t)dictoffset;