mirror of https://github.com/python/cpython
Fix typos in comments (#120188)
This commit is contained in:
parent
57ad769076
commit
6a97929a5a
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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_.
|
||||
|
|
Loading…
Reference in New Issue