diff options
author | Raymond Hettinger <python@rcn.com> | 2016-08-30 10:47:49 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-08-30 10:47:49 -0700 |
commit | 4846ba81c69ebc815b35a89ed54fef7b5ffb1417 (patch) | |
tree | 656d61b61f991d1188750ca86bf0578f986f8446 /Objects/unicodeobject.c | |
parent | a14d81c0a6ed62f9a411aa0b52ecb688a1ac51b9 (diff) | |
download | cpython-4846ba81c69ebc815b35a89ed54fef7b5ffb1417.tar.gz |
Issue #27895: Spelling fixes (Contributed by Ville Skytt?).
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2d31c700de..0226e429c3 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)) { |