]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in comments (#120188)
authorXie Yanbo <xieyanbo@gmail.com>
Fri, 7 Jun 2024 08:19:41 +0000 (16:19 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2024 08:19:41 +0000 (10:19 +0200)
Include/ceval.h
Include/cpython/object.h
Include/cpython/pyframe.h
Include/internal/mimalloc/mimalloc/atomic.h
Include/internal/mimalloc/mimalloc/internal.h
Include/internal/pycore_initconfig.h
Include/internal/pycore_instruments.h
Include/internal/pycore_lock.h
Include/internal/pycore_pythread.h
Include/internal/pycore_unicodeobject.h
Include/structmember.h

index 1ec746c3708220edddb42e00a55d3a04dbd0b465..e9df8684996e23f32bda8b8a0d0ef2888f4efade 100644 (file)
@@ -42,7 +42,7 @@ PyAPI_FUNC(int) Py_MakePendingCalls(void);
      level exceeds "current recursion limit + 50". By construction, this
      protection can only be triggered when the "overflowed" flag is set. It
      means the cleanup code has itself gone into an infinite loop, or the
-     RecursionError has been mistakingly ignored. When this protection is
+     RecursionError has been mistakenly ignored. When this protection is
      triggered, the interpreter aborts with a Fatal Error.
 
    In addition, the "overflowed" flag is automatically reset when the
index e624326693d8e7daafabcab372350470b08a0af3..0ab94e5e2a15e5f15097b0ecdf7936013fd2f33b 100644 (file)
@@ -313,7 +313,7 @@ PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *);
  * triggered as a side-effect of `dst` getting torn down no longer believes
  * `dst` points to a valid object.
  *
- * Temporary variables are used to only evalutate macro arguments once and so
+ * Temporary variables are used to only evaluate macro arguments once and so
  * avoid the duplication of side effects. _Py_TYPEOF() or memcpy() is used to
  * avoid a miscompilation caused by type punning. See Py_CLEAR() comment for
  * implementation details about type punning.
index eeafbb17a56badddb542d8d13cbcd799ea1403eb..51529763923ec3a48662219f08928b6b79ddd5fb 100644 (file)
@@ -28,7 +28,7 @@ struct _PyInterpreterFrame;
  * Does not raise an exception. */
 PyAPI_FUNC(PyObject *) PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame);
 
-/* Returns a byte ofsset into the last executed instruction.
+/* Returns a byte offset into the last executed instruction.
  * Does not raise an exception. */
 PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame *frame);
 
index eb8478ceed6adf33aeff3fd6d8cbcda39ad669f9..52f82487685cdbd5a2575c300077e97a2134c8fa 100644 (file)
@@ -11,7 +11,7 @@ terms of the MIT license. A copy of the license can be found in the file
 // --------------------------------------------------------------------------------------------
 // Atomics
 // We need to be portable between C, C++, and MSVC.
-// We base the primitives on the C/C++ atomics and create a mimimal wrapper for MSVC in C compilation mode.
+// We base the primitives on the C/C++ atomics and create a minimal wrapper for MSVC in C compilation mode.
 // This is why we try to use only `uintptr_t` and `<type>*` as atomic types.
 // To gain better insight in the range of used atomics, we use explicitly named memory order operations
 // instead of passing the memory order as a parameter.
index 94f88fb603af259b00d1ddd21e222ef6bec6450f..d97f51b8eefbe55bf1cbfafb25a46571bfc12963 100644 (file)
@@ -10,7 +10,7 @@ terms of the MIT license. A copy of the license can be found in the file
 
 
 // --------------------------------------------------------------------------
-// This file contains the interal API's of mimalloc and various utility
+// This file contains the internal API's of mimalloc and various utility
 // functions and macros.
 // --------------------------------------------------------------------------
 
index 1c68161341860aa4588e7fdf576737fa01cce99b..6bf1b53bffd3ba39630d449b4887df6fef487d63 100644 (file)
@@ -157,7 +157,7 @@ typedef enum {
     /* For now, this means the GIL is enabled.
 
        gh-116329: This will eventually change to "the GIL is disabled but can
-       be reenabled by loading an incompatible extension module." */
+       be re-enabled by loading an incompatible extension module." */
     _PyConfig_GIL_DEFAULT = -1,
 
     /* The GIL has been forced off or on, and will not be affected by module loading. */
index c98e82c8be5546ad82caca437113c98b1372f297..4e5b374968ea98394c046746b21f61885c37af2a 100644 (file)
@@ -23,7 +23,7 @@ typedef uint32_t _PyMonitoringEventSet;
 #define PY_MONITORING_PROFILER_ID 2
 #define PY_MONITORING_OPTIMIZER_ID 5
 
-/* Internal IDs used to suuport sys.setprofile() and sys.settrace() */
+/* Internal IDs used to support sys.setprofile() and sys.settrace() */
 #define PY_MONITORING_SYS_PROFILE_ID 6
 #define PY_MONITORING_SYS_TRACE_ID 7
 
index d5853b2c9ff464f7cba8046ceabeefa04d03681c..882c4888e5058c8df2f84c0fe2db0d539cedaaad 100644 (file)
@@ -116,7 +116,7 @@ typedef enum _PyLockFlags {
 extern PyLockStatus
 _PyMutex_LockTimed(PyMutex *m, PyTime_t timeout_ns, _PyLockFlags flags);
 
-// Lock a mutex with aditional options. See _PyLockFlags for details.
+// Lock a mutex with additional options. See _PyLockFlags for details.
 static inline void
 PyMutex_LockFlags(PyMutex *m, _PyLockFlags flags)
 {
index 3610c6254db6af36e8dc1f7e485f7b8ad595e35d..f3f5942444e851af27654d401cecc487fc9d9e6a 100644 (file)
@@ -147,7 +147,7 @@ PyAPI_FUNC(int) PyThread_start_joinable_thread(void (*func)(void *),
 PyAPI_FUNC(int) PyThread_join_thread(PyThread_handle_t);
 /*
  * Detach a thread started with `PyThread_start_joinable_thread`, such
- * that its resources are relased as soon as it exits.
+ * that its resources are released as soon as it exits.
  * This function cannot be interrupted. It returns 0 on success,
  * a non-zero value on failure.
  */
index fea5ceea0954f4287ad69f13ee4b1cfef711d3d7..026d6e461f2108707a600b6400b4044f2d9095b3 100644 (file)
@@ -189,7 +189,7 @@ extern PyObject* _PyUnicode_EncodeCharmap(
 
 /* --- Decimal Encoder ---------------------------------------------------- */
 
-// Coverts a Unicode object holding a decimal value to an ASCII string
+// Converts a Unicode object holding a decimal value to an ASCII string
 // for using in int, float and complex parsers.
 // Transforms code points that have decimal digit property to the
 // corresponding ASCII digit code points.  Transforms spaces to ASCII.
index f6e8fd829892f41cc7789123b84a5bb3c15e0485..5f29fbcfed99e36d1c35cccc819c45fc869e7ac7 100644 (file)
@@ -11,7 +11,7 @@ extern "C" {
  * New definitions are in descrobject.h.
  *
  * However, there's nothing wrong with old code continuing to use it,
- * and there's not much mainenance overhead in maintaining a few aliases.
+ * and there's not much maintenance overhead in maintaining a few aliases.
  * So, don't be too eager to convert old code.
  *
  * It uses names not prefixed with Py_.