Skip to content

Commit 8f76234

Browse files
authored
[3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)
(cherry picked from commit dd02a69) Co-authored-by: Christian Clauss <[email protected]> Automerge-Triggered-By: GH:JulienPalard
1 parent 6c97b03 commit 8f76234

File tree

15 files changed

+17
-17
lines changed

15 files changed

+17
-17
lines changed

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ static int _call_function_pointer(int flags,
838838
# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
839839
# endif
840840

841-
/* Even on Apple-arm64 the calling convention for variadic functions conincides
841+
/* Even on Apple-arm64 the calling convention for variadic functions coincides
842842
* with the standard calling convention in the case that the function called
843843
* only with its fixed arguments. Thus, we do not need a special flag to be
844844
* set on variadic functions. We treat a function as variadic if it is called

Modules/_ctypes/cfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
3535
* Expects the size, index and offset for the current field in *psize and
3636
* *poffset, stores the total size so far in *psize, the offset for the next
3737
* field in *poffset, the alignment requirements for the current field in
38-
* *palign, and returns a field desriptor for this field.
38+
* *palign, and returns a field descriptor for this field.
3939
*/
4040
/*
4141
* bitfields extension:

Modules/_ctypes/ctypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ typedef struct {
208208
PyObject *checker;
209209
int flags; /* calling convention and such */
210210

211-
/* pep3118 fields, pointers neeed PyMem_Free */
211+
/* pep3118 fields, pointers need PyMem_Free */
212212
char *format;
213213
int ndim;
214214
Py_ssize_t *shape;

Modules/_pickle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4531,7 +4531,7 @@ dump(PicklerObject *self, PyObject *obj)
45314531
* call when setting the reducer_override attribute of the Pickler instance
45324532
* to a bound method of the same instance. This is important as the Pickler
45334533
* instance holds a reference to each object it has pickled (through its
4534-
* memo): thus, these objects wont be garbage-collected as long as the
4534+
* memo): thus, these objects won't be garbage-collected as long as the
45354535
* Pickler itself is not collected. */
45364536
Py_CLEAR(self->reducer_override);
45374537
return status;
@@ -6587,7 +6587,7 @@ do_setitems(UnpicklerObject *self, Py_ssize_t x)
65876587
return 0;
65886588
if ((len - x) % 2 != 0) {
65896589
PickleState *st = _Pickle_GetGlobalState();
6590-
/* Currupt or hostile pickle -- we never write one like this. */
6590+
/* Corrupt or hostile pickle -- we never write one like this. */
65916591
PyErr_SetString(st->UnpicklingError,
65926592
"odd number of items for SETITEMS");
65936593
return -1;

Modules/_sre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* 2001-05-14 fl fixes for 1.5.2 compatibility
1616
* 2001-07-01 fl added BIGCHARSET support (from Martin von Loewis)
1717
* 2001-10-18 fl fixed group reset issue (from Matthew Mueller)
18-
* 2001-10-20 fl added split primitive; reenable unicode for 1.6/2.0/2.1
18+
* 2001-10-20 fl added split primitive; re-enable unicode for 1.6/2.0/2.1
1919
* 2001-10-21 fl added sub/subn primitive
2020
* 2001-10-24 fl added finditer primitive (for 2.2 only)
2121
* 2001-12-07 fl fixed memory leak in sub/subn (Guido van Rossum)

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5127,7 +5127,7 @@ encode_locale_ex(PyObject *self, PyObject *args)
51275127
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
51285128
break;
51295129
default:
5130-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5130+
PyErr_SetString(PyExc_ValueError, "unknown error code");
51315131
break;
51325132
}
51335133
return res;
@@ -5170,7 +5170,7 @@ decode_locale_ex(PyObject *self, PyObject *args)
51705170
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
51715171
break;
51725172
default:
5173-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5173+
PyErr_SetString(PyExc_ValueError, "unknown error code");
51745174
break;
51755175
}
51765176
return res;

Modules/_tkinter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ PyTclObject_str(PyTclObject *self)
936936
Py_INCREF(self->string);
937937
return self->string;
938938
}
939-
/* XXX Could chache result if it is non-ASCII. */
939+
/* XXX Could cache result if it is non-ASCII. */
940940
return unicodeFromTclObj(self->value);
941941
}
942942

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ tracemalloc_clear_filename(void *value)
836836
static void
837837
tracemalloc_clear_traces(void)
838838
{
839-
/* The GIL protects variables againt concurrent access */
839+
/* The GIL protects variables against concurrent access */
840840
assert(PyGILState_Check());
841841

842842
TABLES_LOCK();

Modules/_zoneinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
13471347
* could technically be calculated from the timestamp, but given that the
13481348
* callers of this function already have the year information accessible from
13491349
* the datetime struct, it is taken as an additional parameter to reduce
1350-
* unncessary calculation.
1350+
* unnecessary calculation.
13511351
* */
13521352
static _ttinfo *
13531353
find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)

Modules/expat/xmlparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3976,7 +3976,7 @@ initializeEncoding(XML_Parser parser) {
39763976
const char *s;
39773977
#ifdef XML_UNICODE
39783978
char encodingBuf[128];
3979-
/* See comments abount `protoclEncodingName` in parserInit() */
3979+
/* See comments about `protoclEncodingName` in parserInit() */
39803980
if (! parser->m_protocolEncodingName)
39813981
s = NULL;
39823982
else {

Modules/gc_weakref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ CT while gc is running.
5050
https://www.python.org/sf/1055820
5151

5252
shows how innocent it can be, and also how nasty. Variants of the three
53-
focussed test cases attached to that bug report are now part of Python's
53+
focused test cases attached to that bug report are now part of Python's
5454
standard Lib/test/test_gc.py.
5555

5656
Jim Fulton gave the best nutshell summary of the new (in 2.4 and 2.3.5)

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
15101510
}
15111511

15121512
/* If a pyvenv.cfg configure file is found,
1513-
argv0_path is overriden with its 'home' variable. */
1513+
argv0_path is overridden with its 'home' variable. */
15141514
status = calculate_read_pyenv(calculate);
15151515
if (_PyStatus_EXCEPTION(status)) {
15161516
return status;

Modules/sha1module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ sha1_done(struct sha1_state *sha1, unsigned char *out)
269269
sha1->curlen = 0;
270270
}
271271

272-
/* pad upto 56 bytes of zeroes */
272+
/* pad up to 56 bytes of zeroes */
273273
while (sha1->curlen < 56) {
274274
sha1->buf[sha1->curlen++] = (unsigned char)0;
275275
}

Modules/socketmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ sock_call_ex(PySocketSockObject *s,
965965
reading, but the data then discarded by the OS because of a
966966
wrong checksum.
967967
968-
Loop on select() to recheck for socket readyness. */
968+
Loop on select() to recheck for socket readiness. */
969969
continue;
970970
}
971971

Modules/syslogmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ syslog_syslog(PyObject * self, PyObject * args)
183183
PyObject *openargs;
184184

185185
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
186-
* So, we can still do loggin in the unlikely event things are so hosed
186+
* So, we can still do logging in the unlikely event things are so hosed
187187
* that we can't do this tuple.
188188
*/
189189
if ((openargs = PyTuple_New(0))) {

0 commit comments

Comments
 (0)