summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-08-30 17:47:49 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-08-30 17:47:49 (GMT)
commit15f44ab043b37c064d6891c7864205fed9fb0dd1 (patch)
tree726736587da36fbfebc1dfb12c4d9c14e6bf9a61 /Modules
parent613debcf0a0409b49ad4e1ee63dfc73119029755 (diff)
downloadcpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.zip
cpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.tar.gz
cpython-15f44ab043b37c064d6891c7864205fed9fb0dd1.tar.bz2
Issue #27895: Spelling fixes (Contributed by Ville Skyttä).
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/ctypes.h2
-rw-r--r--Modules/_hashopenssl.c2
-rw-r--r--Modules/_io/iobase.c2
-rw-r--r--Modules/_pickle.c4
-rw-r--r--Modules/_testcapimodule.c2
-rw-r--r--Modules/_threadmodule.c2
-rw-r--r--Modules/_tracemalloc.c2
-rw-r--r--Modules/binascii.c4
-rw-r--r--Modules/mathmodule.c2
-rw-r--r--Modules/socketmodule.c2
-rw-r--r--Modules/zipimport.c2
11 files changed, 13 insertions, 13 deletions
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index b06ba8a..b4a9b78 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -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
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 44765ac..f45744a 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -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.
*/
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index f07a0ca..472ef3b 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -90,7 +90,7 @@ iobase_unsupported(const char *message)
return NULL;
}
-/* Positionning */
+/* Positioning */
PyDoc_STRVAR(iobase_seek_doc,
"Change stream position.\n"
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index f029ed6..a8d414e 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -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;
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 5d661f7..6fabc40 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -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);
}
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index 968181c..0219559 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -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
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index e3329c7..48f5b47 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -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
diff --git a/Modules/binascii.c b/Modules/binascii.c
index 50b09fe..c3320ce 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -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 ) {
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 43aa229..95ea4f7 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -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
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index d896cc0..f94c322 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index e840271..6d5c68a 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -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. */