Issue #27895: Spelling fixes (Contributed by Ville Skyttä).

This commit is contained in:
Raymond Hettinger 2016-08-30 10:47:49 -07:00
parent 613debcf0a
commit 15f44ab043
72 changed files with 121 additions and 121 deletions

View file

@ -238,7 +238,7 @@ typedef struct {
StgDictObject function to a generic one.
Currently, PyCFuncPtr types have 'converters' and 'checker' entries in their
type dict. They are only used to cache attributes from other entries, whihc
type dict. They are only used to cache attributes from other entries, which
is wrong.
One use case is the .value attribute that all simple types have. But some

View file

@ -724,7 +724,7 @@ generate_hash_name_list(void)
/*
* This macro generates constructor function definitions for specific
* hash algorithms. These constructors are much faster than calling
* the generic one passing it a python string and are noticably
* the generic one passing it a python string and are noticeably
* faster than calling a python new() wrapper. Thats important for
* code that wants to make hashes of a bunch of small strings.
*/

View file

@ -90,7 +90,7 @@ iobase_unsupported(const char *message)
return NULL;
}
/* Positionning */
/* Positioning */
PyDoc_STRVAR(iobase_seek_doc,
"Change stream position.\n"

View file

@ -2131,7 +2131,7 @@ raw_unicode_escape(PyObject *obj)
Py_UCS4 ch = PyUnicode_READ(kind, data, i);
/* Map 32-bit characters to '\Uxxxxxxxx' */
if (ch >= 0x10000) {
/* -1: substract 1 preallocated byte */
/* -1: subtract 1 preallocated byte */
p = _PyBytesWriter_Prepare(&writer, p, 10-1);
if (p == NULL)
goto error;
@ -2149,7 +2149,7 @@ raw_unicode_escape(PyObject *obj)
}
/* Map 16-bit characters, '\\' and '\n' to '\uxxxx' */
else if (ch >= 256 || ch == '\\' || ch == '\n') {
/* -1: substract 1 preallocated byte */
/* -1: subtract 1 preallocated byte */
p = _PyBytesWriter_Prepare(&writer, p, 6-1);
if (p == NULL)
goto error;

View file

@ -3798,7 +3798,7 @@ get_recursion_depth(PyObject *self, PyObject *args)
{
PyThreadState *tstate = PyThreadState_GET();
/* substract one to ignore the frame of the get_recursion_depth() call */
/* subtract one to ignore the frame of the get_recursion_depth() call */
return PyLong_FromLong(tstate->recursion_depth - 1);
}

View file

@ -45,7 +45,7 @@ lock_dealloc(lockobject *self)
/* Helper to acquire an interruptible lock with a timeout. If the lock acquire
* is interrupted, signal handlers are run, and if they raise an exception,
* PY_LOCK_INTR is returned. Otherwise, PY_LOCK_ACQUIRED or PY_LOCK_FAILURE
* are returned, depending on whether the lock can be acquired withing the
* are returned, depending on whether the lock can be acquired within the
* timeout.
*/
static PyLockStatus

View file

@ -716,7 +716,7 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size)
if (ADD_TRACE(ptr2, new_size) < 0) {
/* Memory allocation failed. The error cannot be reported to
the caller, because realloc() may already have shrinked the
the caller, because realloc() may already have shrunk the
memory block and so removed bytes.
This case is very unlikely: a hash entry has just been

View file

@ -837,7 +837,7 @@ binascii_rledecode_hqx_impl(PyObject *module, Py_buffer *data)
if (in_byte == RUNCHAR) {
INBYTE(in_repeat);
/* only 1 byte will be written, but 2 bytes were preallocated:
substract 1 byte to prevent overallocation */
subtract 1 byte to prevent overallocation */
writer.min_size--;
if (in_repeat != 0) {
@ -858,7 +858,7 @@ binascii_rledecode_hqx_impl(PyObject *module, Py_buffer *data)
if (in_byte == RUNCHAR) {
INBYTE(in_repeat);
/* only 1 byte will be written, but 2 bytes were preallocated:
substract 1 byte to prevent overallocation */
subtract 1 byte to prevent overallocation */
writer.min_size--;
if ( in_repeat == 0 ) {

View file

@ -1274,7 +1274,7 @@ count_set_bits(unsigned long n)
/* Divide-and-conquer factorial algorithm
*
* Based on the formula and psuedo-code provided at:
* Based on the formula and pseudo-code provided at:
* http://www.luschny.de/math/factorial/binarysplitfact.html
*
* Faster algorithms exist, but they're more complicated and depend on

View file

@ -6611,7 +6611,7 @@ PyInit__socket(void)
PyModule_AddIntConstant(m, "SOMAXCONN", 5); /* Common value */
#endif
/* Ancilliary message types */
/* Ancillary message types */
#ifdef SCM_RIGHTS
PyModule_AddIntMacro(m, SCM_RIGHTS);
#endif

View file

@ -1315,7 +1315,7 @@ unmarshal_code(PyObject *pathname, PyObject *data, time_t mtime)
return code;
}
/* Replace any occurances of "\r\n?" in the input string with "\n".
/* Replace any occurrences of "\r\n?" in the input string with "\n".
This converts DOS and Mac line endings to Unix line endings.
Also append a trailing "\n" to be compatible with
PyParser_SimpleParseFile(). Returns a new reference. */