diff options
author | Raymond Hettinger <python@rcn.com> | 2016-08-30 17:47:49 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-08-30 17:47:49 (GMT) |
commit | 15f44ab043b37c064d6891c7864205fed9fb0dd1 (patch) | |
tree | 726736587da36fbfebc1dfb12c4d9c14e6bf9a61 /Objects | |
parent | 613debcf0a0409b49ad4e1ee63dfc73119029755 (diff) | |
download | cpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.zip cpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.tar.gz cpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.tar.bz2 |
Issue #27895: Spelling fixes (Contributed by Ville Skyttä).
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytearrayobject.c | 2 | ||||
-rw-r--r-- | Objects/bytesobject.c | 4 | ||||
-rw-r--r-- | Objects/codeobject.c | 2 | ||||
-rw-r--r-- | Objects/listsort.txt | 2 | ||||
-rw-r--r-- | Objects/longobject.c | 2 | ||||
-rw-r--r-- | Objects/stringlib/codecs.h | 6 | ||||
-rw-r--r-- | Objects/typeobject.c | 2 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 14 |
8 files changed, 17 insertions, 17 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index b6631f9..c6d0707 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -481,7 +481,7 @@ bytearray_setslice_linear(PyByteArrayObject *self, If growth < 0 and lo != 0, the operation is completed, but a MemoryError is still raised and the memory block is not - shrinked. Otherwise, the bytearray is restored in its previous + shrunk. Otherwise, the bytearray is restored in its previous state and a MemoryError is raised. */ if (lo == 0) { self->ob_start += growth; diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 4fdaa52..b0d9b39 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -247,7 +247,7 @@ PyBytes_FromFormatV(const char *format, va_list vargs) ++f; } - /* substract bytes preallocated for the format string + /* subtract bytes preallocated for the format string (ex: 2 for "%s") */ writer.min_size -= (f - p + 1); @@ -1093,7 +1093,7 @@ _PyBytes_DecodeEscapeRecode(const char **s, const char *end, assert(PyBytes_Check(w)); /* Append bytes to output buffer. */ - writer->min_size--; /* substract 1 preallocated byte */ + writer->min_size--; /* subtract 1 preallocated byte */ p = _PyBytesWriter_WriteBytes(writer, p, PyBytes_AS_STRING(w), PyBytes_GET_SIZE(w)); diff --git a/Objects/codeobject.c b/Objects/codeobject.c index f089f75..78f5034 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -719,7 +719,7 @@ _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds) /* possible optimization: if f->f_lasti == instr_ub (likely to be a common case) then we already know instr_lb -- if we stored the matching value of p - somwhere we could skip the first while loop. */ + somewhere we could skip the first while loop. */ /* See lnotab_notes.txt for the description of co_lnotab. A point to remember: increments to p diff --git a/Objects/listsort.txt b/Objects/listsort.txt index fef982f..17d2797 100644 --- a/Objects/listsort.txt +++ b/Objects/listsort.txt @@ -694,7 +694,7 @@ search doesn't reduce the quadratic data movement costs. But in CPython's case, comparisons are extraordinarily expensive compared to moving data, and the details matter. Moving objects is just copying -pointers. Comparisons can be arbitrarily expensive (can invoke arbitary +pointers. Comparisons can be arbitrarily expensive (can invoke arbitrary user-supplied Python code), but even in simple cases (like 3 < 4) _all_ decisions are made at runtime: what's the type of the left comparand? the type of the right? do they need to be coerced to a common type? where's the diff --git a/Objects/longobject.c b/Objects/longobject.c index 9d6474c..4ace778 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -368,7 +368,7 @@ PyLong_FromDouble(double dval) /* Checking for overflow in PyLong_AsLong is a PITA since C doesn't define * anything about what happens when a signed integer operation overflows, * and some compilers think they're doing you a favor by being "clever" - * then. The bit pattern for the largest postive signed long is + * then. The bit pattern for the largest positive signed long is * (unsigned long)LONG_MAX, and for the smallest negative signed long * it is abs(LONG_MIN), which we could write -(unsigned long)LONG_MIN. * However, some other compilers warn about applying unary minus to an diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h index 2846d7e..749e765 100644 --- a/Objects/stringlib/codecs.h +++ b/Objects/stringlib/codecs.h @@ -347,7 +347,7 @@ STRINGLIB(utf8_encoder)(PyObject *unicode, break; case _Py_ERROR_BACKSLASHREPLACE: - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= max_char_size * (endpos - startpos); p = backslashreplace(&writer, p, unicode, startpos, endpos); @@ -357,7 +357,7 @@ STRINGLIB(utf8_encoder)(PyObject *unicode, break; case _Py_ERROR_XMLCHARREFREPLACE: - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= max_char_size * (endpos - startpos); p = xmlcharrefreplace(&writer, p, unicode, startpos, endpos); @@ -387,7 +387,7 @@ STRINGLIB(utf8_encoder)(PyObject *unicode, if (!rep) goto error; - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= max_char_size; if (PyBytes_Check(rep)) { diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 9b3d153..5f0db2b 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3792,7 +3792,7 @@ import_copyreg(void) /* Try to fetch cached copy of copyreg from sys.modules first in an attempt to avoid the import overhead. Previously this was implemented by storing a reference to the cached module in a static variable, but - this broke when multiple embeded interpreters were in use (see issue + this broke when multiple embedded interpreters were in use (see issue #17408 and #19088). */ copyreg_module = PyDict_GetItemWithError(interp->modules, copyreg_str); if (copyreg_module != NULL) { diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2d31c70..0226e42 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -6110,7 +6110,7 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode) /* Escape backslashes */ if (ch == '\\') { - /* -1: substract 1 preallocated byte */ + /* -1: subtract 1 preallocated byte */ p = _PyBytesWriter_Prepare(&writer, p, 2-1); if (p == NULL) goto error; @@ -6183,7 +6183,7 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode) /* Map non-printable US ASCII to '\xhh' */ else if (ch < ' ' || ch >= 0x7F) { - /* -1: substract 1 preallocated byte */ + /* -1: subtract 1 preallocated byte */ p = _PyBytesWriter_Prepare(&writer, p, 4-1); if (p == NULL) goto error; @@ -6363,7 +6363,7 @@ PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode) if (ch >= 0x10000) { assert(ch <= MAX_UNICODE); - /* -1: substract 1 preallocated byte */ + /* -1: subtract 1 preallocated byte */ p = _PyBytesWriter_Prepare(&writer, p, 10-1); if (p == NULL) goto error; @@ -6381,7 +6381,7 @@ PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode) } /* Map 16-bit characters to '\uxxxx' */ else if (ch >= 256) { - /* -1: substract 1 preallocated byte */ + /* -1: subtract 1 preallocated byte */ p = _PyBytesWriter_Prepare(&writer, p, 6-1); if (p == NULL) goto error; @@ -6705,7 +6705,7 @@ unicode_encode_ucs1(PyObject *unicode, break; case _Py_ERROR_BACKSLASHREPLACE: - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= (collend - collstart); str = backslashreplace(&writer, str, unicode, collstart, collend); @@ -6715,7 +6715,7 @@ unicode_encode_ucs1(PyObject *unicode, break; case _Py_ERROR_XMLCHARREFREPLACE: - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= (collend - collstart); str = xmlcharrefreplace(&writer, str, unicode, collstart, collend); @@ -6747,7 +6747,7 @@ unicode_encode_ucs1(PyObject *unicode, if (rep == NULL) goto onError; - /* substract preallocated bytes */ + /* subtract preallocated bytes */ writer.min_size -= 1; if (PyBytes_Check(rep)) { |