Skip to content

Commit 0158af3

Browse files
committed
Issue python#17047: remove doubled words found in 2.7 to 3.4 Modules/*,
as reported by Serhiy Storchaka and Matthew Barnett.
1 parent 65e69b3 commit 0158af3

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

Modules/_ctypes/callproc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
2121
2. After several checks, _build_callargs() is called which returns another
2222
tuple 'callargs'. This may be the same tuple as 'inargs', a slice of
23-
'inargs', or a completely fresh tuple, depending on several things (is is a
24-
COM method, are 'paramflags' available).
23+
'inargs', or a completely fresh tuple, depending on several things (is it a
24+
COM method?, are 'paramflags' available?).
2525
2626
3. _build_callargs also calculates bitarrays containing indexes into
2727
the callargs tuple, specifying how to build the return value(s) of

Modules/_ctypes/libffi/src/dlmalloc.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
101101
If you don't like either of these options, you can define
102102
CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything
103-
else. And if if you are sure that your program using malloc has
103+
else. And if you are sure that your program using malloc has
104104
no errors or vulnerabilities, you can define INSECURE to 1,
105105
which might (or might not) provide a small performance improvement.
106106
@@ -599,7 +599,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K
599599
declaration needed is the mallinfo struct that is returned (by-copy)
600600
by mallinfo(). The malloinfo struct contains a bunch of fields that
601601
are not even meaningful in this version of malloc. These fields are
602-
are instead filled by mallinfo() with other numbers that might be of
602+
instead filled by mallinfo() with other numbers that might be of
603603
interest.
604604
605605
HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
@@ -1564,7 +1564,7 @@ static MLOCK_T magic_init_mutex;
15641564
Each freshly allocated chunk must have both cinuse and pinuse set.
15651565
That is, each allocated chunk borders either a previously allocated
15661566
and still in-use chunk, or the base of its memory arena. This is
1567-
ensured by making all allocations from the the `lowest' part of any
1567+
ensured by making all allocations from the `lowest' part of any
15681568
found chunk. Further, no free chunk physically borders another one,
15691569
so each free chunk is known to be preceded and followed by either
15701570
inuse chunks or the ends of memory.
@@ -1770,12 +1770,12 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17701770
of the same size are arranged in a circularly-linked list, with only
17711771
the oldest chunk (the next to be used, in our FIFO ordering)
17721772
actually in the tree. (Tree members are distinguished by a non-null
1773-
parent pointer.) If a chunk with the same size an an existing node
1773+
parent pointer.) If a chunk with the same size as an existing node
17741774
is inserted, it is linked off the existing node using pointers that
17751775
work in the same way as fd/bk pointers of small chunks.
17761776
17771777
Each tree contains a power of 2 sized range of chunk sizes (the
1778-
smallest is 0x100 <= x < 0x180), which is is divided in half at each
1778+
smallest is 0x100 <= x < 0x180), which is divided in half at each
17791779
tree level, with the chunks in the smaller half of the range (0x100
17801780
<= x < 0x140 for the top nose) in the left subtree and the larger
17811781
half (0x140 <= x < 0x180) in the right subtree. This is, of course,
@@ -3380,7 +3380,7 @@ static void* sys_alloc(mstate m, size_t nb) {
33803380
least-preferred order):
33813381
1. A call to MORECORE that can normally contiguously extend memory.
33823382
(disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or
3383-
or main space is mmapped or a previous contiguous call failed)
3383+
main space is mmapped or a previous contiguous call failed)
33843384
2. A call to MMAP new space (disabled if not HAVE_MMAP).
33853385
Note that under the default settings, if MORECORE is unable to
33863386
fulfill a request, and HAVE_MMAP is true, then mmap is

Modules/_ctypes/libffi/src/ia64/ffi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ endian_adjust (void *addr, size_t len)
8484
#define ldf_fill(result, addr) \
8585
asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));
8686

87-
/* Return the size of the C type associated with with TYPE. Which will
87+
/* Return the size of the C type associated with TYPE, which will
8888
be one of the FFI_IA64_TYPE_HFA_* values. */
8989

9090
static size_t
@@ -184,7 +184,7 @@ hfa_element_type (ffi_type *type, int nested)
184184
break;
185185

186186
case FFI_TYPE_LONGDOUBLE:
187-
/* Similarly, except that that HFA is true for double extended,
187+
/* Similarly, except that HFA is true for double extended,
188188
but not quad precision. Both have sizeof == 16, so tell the
189189
difference based on the precision. */
190190
if (LDBL_MANT_DIG == 64 && nested)

Modules/_heapqmodule.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ _siftup(PyListObject *heap, Py_ssize_t pos)
116116
}
117117
}
118118

119-
/* The leaf at pos is empty now. Put newitem there, and and bubble
119+
/* The leaf at pos is empty now. Put newitem there, and bubble
120120
it up to its final resting place (by sifting its parents down). */
121121
Py_DECREF(PyList_GET_ITEM(heap, pos));
122122
PyList_SET_ITEM(heap, pos, newitem);
@@ -456,7 +456,7 @@ _siftupmax(PyListObject *heap, Py_ssize_t pos)
456456
childpos = 2*pos + 1;
457457
}
458458

459-
/* The leaf at pos is empty now. Put newitem there, and and bubble
459+
/* The leaf at pos is empty now. Put newitem there, and bubble
460460
it up to its final resting place (by sifting its parents down). */
461461
Py_DECREF(PyList_GET_ITEM(heap, pos));
462462
PyList_SET_ITEM(heap, pos, newitem);

Modules/_io/iobase.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ iobase_unsupported(const char *message)
7575
PyDoc_STRVAR(iobase_seek_doc,
7676
"Change stream position.\n"
7777
"\n"
78-
"Change the stream position to byte offset offset. offset is\n"
78+
"Change the stream position to the given byte offset. The offset is\n"
7979
"interpreted relative to the position indicated by whence. Values\n"
8080
"for whence are:\n"
8181
"\n"

Modules/expat/xmltok.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ initScan(const ENCODING * const *encodingTable,
15841584
if (ptr[0] == '\0') {
15851585
/* 0 isn't a legal data character. Furthermore a document
15861586
entity can only start with ASCII characters. So the only
1587-
way this can fail to be big-endian UTF-16 if it it's an
1587+
way this can fail to be big-endian UTF-16 is if it is an
15881588
external parsed general entity that's labelled as
15891589
UTF-16LE.
15901590
*/

Modules/ossaudiodev.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ oss_mixer_dealloc(oss_mixer_t *self)
215215
*/
216216

217217
/* _do_ioctl_1() is a private helper function used for the OSS ioctls --
218-
SNDCTL_DSP_{SETFMT,CHANNELS,SPEED} -- that that are called from C
218+
SNDCTL_DSP_{SETFMT,CHANNELS,SPEED} -- that are called from C
219219
like this:
220220
ioctl(fd, SNDCTL_DSP_cmd, &arg)
221221

Modules/zlib/deflate.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
157157

158158
/* ===========================================================================
159159
* Update a hash value with the given input byte
160-
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
160+
* IN assertion: all calls to UPDATE_HASH are made with consecutive
161161
* input characters, so that a running hash key can be computed from the
162162
* previous key instead of complete recalculation each time.
163163
*/
@@ -170,7 +170,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
170170
* the previous length of the hash chain.
171171
* If this file is compiled with -DFASTEST, the compression level is forced
172172
* to 1, and no hash chains are maintained.
173-
* IN assertion: all calls to to INSERT_STRING are made with consecutive
173+
* IN assertion: all calls to INSERT_STRING are made with consecutive
174174
* input characters and the first MIN_MATCH bytes of str are valid
175175
* (except for the last MIN_MATCH-1 bytes of the input file).
176176
*/

Modules/zlib/inftrees.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef struct {
4141
examples/enough.c found in the zlib distribtution. The arguments to that
4242
program are the number of symbols, the initial root table size, and the
4343
maximum bit length of a code. "enough 286 9 15" for literal/length codes
44-
returns returns 852, and "enough 30 6 15" for distance codes returns 592.
44+
returns 852, and "enough 30 6 15" for distance codes returns 592.
4545
The initial root table size (9 or 6) is found in the fifth argument of the
4646
inflate_table() calls in inflate.c and infback.c. If the root table size is
4747
changed, then these maximum sizes would be need to be recalculated and

Modules/zlib/zlib.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
812812
inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
813813
if no more input was provided, Z_DATA_ERROR if no flush point has been
814814
found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
815-
success case, the application may save the current current value of total_in
815+
success case, the application may save the current value of total_in
816816
which indicates where valid compressed data was found. In the error case,
817817
the application may repeatedly call inflateSync, providing more input each
818818
time, until success or end of the input data.

0 commit comments

Comments
 (0)