Skip to content

Commit 009b811

Browse files
Removed unintentional trailing spaces in non-external and non-generated C files.
1 parent 6c32585 commit 009b811

25 files changed

+56
-56
lines changed

Diff for: Doc/includes/noddy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static PyModuleDef noddymodule = {
3838
};
3939

4040
PyMODINIT_FUNC
41-
PyInit_noddy(void)
41+
PyInit_noddy(void)
4242
{
4343
PyObject* m;
4444

Diff for: Include/codecs.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ PyAPI_FUNC(int) PyCodec_KnownEncoding(
7171
object is passed through the encoder function found for the given
7272
encoding using the error handling method defined by errors. errors
7373
may be NULL to use the default method defined for the codec.
74-
74+
7575
Raises a LookupError in case no encoder can be found.
7676
7777
*/
@@ -87,7 +87,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode(
8787
object is passed through the decoder function found for the given
8888
encoding using the error handling method defined by errors. errors
8989
may be NULL to use the default method defined for the codec.
90-
90+
9191
Raises a LookupError in case no encoder can be found.
9292
9393
*/
@@ -145,7 +145,7 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
145145

146146

147147

148-
/* --- Codec Lookup APIs --------------------------------------------------
148+
/* --- Codec Lookup APIs --------------------------------------------------
149149
150150
All APIs return a codec object with incremented refcount and are
151151
based on _PyCodec_Lookup(). The same comments w/r to the encoding

Diff for: Include/sliceobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length,
4141
PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length,
4242
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
4343
PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,
44-
Py_ssize_t *start, Py_ssize_t *stop,
44+
Py_ssize_t *start, Py_ssize_t *stop,
4545
Py_ssize_t *step, Py_ssize_t *slicelength);
4646

4747
#ifdef __cplusplus

Diff for: Include/ucnhash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ typedef struct {
1616
int size;
1717

1818
/* Get name for a given character code. Returns non-zero if
19-
success, zero if not. Does not set Python exceptions.
19+
success, zero if not. Does not set Python exceptions.
2020
If self is NULL, data come from the default version of the database.
2121
If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */
2222
int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen,

Diff for: Modules/_bz2module.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self)
666666
self->unused_data = PyBytes_FromStringAndSize(NULL, 0);
667667
if (self->unused_data == NULL)
668668
goto error;
669-
669+
670670
bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0);
671671
if (catch_bz2_error(bzerror))
672672
goto error;

Diff for: Modules/_io/bufferedio.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
10551055
}
10561056
else
10571057
n = 0;
1058-
1058+
10591059
if (n == 0 || (n == -2 && written > 0))
10601060
break;
10611061
if (n < 0) {
@@ -1065,7 +1065,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
10651065
}
10661066
goto end;
10671067
}
1068-
1068+
10691069
/* At most one read in readinto1 mode */
10701070
if (readinto1) {
10711071
written += n;

Diff for: Modules/_lzmamodule.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ grow_buffer(PyObject **buf, Py_ssize_t max_length)
149149
{
150150
Py_ssize_t size = PyBytes_GET_SIZE(*buf);
151151
Py_ssize_t newsize = size + (size >> 3) + 6;
152-
152+
153153
if (max_length > 0 && newsize > max_length)
154154
newsize = max_length;
155-
155+
156156
return _PyBytes_Resize(buf, newsize);
157157
}
158158

@@ -906,7 +906,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
906906
Py_ssize_t data_size = 0;
907907
PyObject *result;
908908
lzma_stream *lzs = &d->lzs;
909-
909+
910910
if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE)
911911
result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
912912
else
@@ -916,7 +916,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
916916

917917
lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result);
918918
lzs->avail_out = PyBytes_GET_SIZE(result);
919-
919+
920920
for (;;) {
921921
lzma_ret lzret;
922922

@@ -947,7 +947,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
947947
goto error;
948948

949949
return result;
950-
950+
951951
error:
952952
Py_XDECREF(result);
953953
return NULL;
@@ -959,11 +959,11 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
959959
char input_buffer_in_use;
960960
PyObject *result;
961961
lzma_stream *lzs = &d->lzs;
962-
962+
963963
/* Prepend unconsumed input if necessary */
964964
if (lzs->next_in != NULL) {
965965
size_t avail_now, avail_total;
966-
966+
967967
/* Number of bytes we can append to input buffer */
968968
avail_now = (d->input_buffer + d->input_buffer_size)
969969
- (lzs->next_in + lzs->avail_in);
@@ -987,7 +987,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
987987
}
988988
d->input_buffer = tmp;
989989
d->input_buffer_size = new_size;
990-
990+
991991
lzs->next_in = d->input_buffer + offset;
992992
}
993993
else if (avail_now < len) {
@@ -1054,7 +1054,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
10541054
lzs->next_in = d->input_buffer;
10551055
}
10561056
}
1057-
1057+
10581058
return result;
10591059

10601060
error:
@@ -1247,7 +1247,7 @@ Decompressor_dealloc(Decompressor *self)
12471247
{
12481248
if(self->input_buffer != NULL)
12491249
PyMem_Free(self->input_buffer);
1250-
1250+
12511251
lzma_end(&self->lzs);
12521252
Py_CLEAR(self->unused_data);
12531253
#ifdef WITH_THREAD

Diff for: Modules/_sqlite/microprotocols.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern PyObject *pysqlite_microprotocols_adapt(
4848
PyObject *obj, PyObject *proto, PyObject *alt);
4949

5050
extern PyObject *
51-
pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
51+
pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
5252
#define pysqlite_adapt_doc \
5353
"adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard."
5454

Diff for: Modules/_testbuffer.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ ndbuf_delete(NDArrayObject *nd, ndbuf_t *elt)
190190
elt->prev->next = elt->next;
191191
else
192192
nd->head = elt->next;
193-
193+
194194
if (elt->next)
195195
elt->next->prev = elt->prev;
196196

@@ -767,7 +767,7 @@ ndarray_as_list(NDArrayObject *nd)
767767
+-----------------+-----------+-------------+----------------+
768768
| base.readonly | 0 | OK | OK |
769769
+-----------------+-----------+-------------+----------------+
770-
| base.format | NULL | OK | OK |
770+
| base.format | NULL | OK | OK |
771771
+-----------------+-----------+-------------+----------------+
772772
| base.ndim | 1 | 1 | OK |
773773
+-----------------+-----------+-------------+----------------+
@@ -2018,7 +2018,7 @@ ndarray_get_obj(NDArrayObject *self, void *closure)
20182018
{
20192019
Py_buffer *base = &self->head->base;
20202020

2021-
if (base->obj == NULL) {
2021+
if (base->obj == NULL) {
20222022
Py_RETURN_NONE;
20232023
}
20242024
Py_INCREF(base->obj);
@@ -2558,7 +2558,7 @@ cmp_contig(PyObject *self, PyObject *args)
25582558
PyBuffer_Release(&v1);
25592559
PyBuffer_Release(&v2);
25602560

2561-
ret = equal ? Py_True : Py_False;
2561+
ret = equal ? Py_True : Py_False;
25622562
Py_INCREF(ret);
25632563
return ret;
25642564
}

Diff for: Modules/_testcapimodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ make_memoryview_from_NULL_pointer(PyObject *self)
24762476
return NULL;
24772477
return PyMemoryView_FromBuffer(&info);
24782478
}
2479-
2479+
24802480
static PyObject *
24812481
test_from_contiguous(PyObject* self, PyObject *noargs)
24822482
{

Diff for: Modules/atexitmodule.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ atexit_callfuncs(void)
9494
if (exc_type) {
9595
Py_DECREF(exc_type);
9696
Py_XDECREF(exc_value);
97-
Py_XDECREF(exc_tb);
97+
Py_XDECREF(exc_tb);
9898
}
9999
PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
100100
if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
@@ -147,7 +147,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
147147
if (PyTuple_GET_SIZE(args) == 0) {
148148
PyErr_SetString(PyExc_TypeError,
149149
"register() takes at least 1 argument (0 given)");
150-
return NULL;
150+
return NULL;
151151
}
152152

153153
func = PyTuple_GET_ITEM(args, 0);
@@ -159,7 +159,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
159159

160160
new_callback = PyMem_Malloc(sizeof(atexit_callback));
161161
if (new_callback == NULL)
162-
return PyErr_NoMemory();
162+
return PyErr_NoMemory();
163163

164164
new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
165165
if (new_callback->args == NULL) {
@@ -336,7 +336,7 @@ PyInit_atexit(void)
336336
modstate = GET_ATEXIT_STATE(m);
337337
modstate->callback_len = 32;
338338
modstate->ncallbacks = 0;
339-
modstate->atexit_callbacks = PyMem_New(atexit_callback*,
339+
modstate->atexit_callbacks = PyMem_New(atexit_callback*,
340340
modstate->callback_len);
341341
if (modstate->atexit_callbacks == NULL)
342342
return NULL;

Diff for: Modules/parsermodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2788,7 +2788,7 @@ validate_argument(node *tree)
27882788
int nch = NCH(tree);
27892789
int res = (validate_ntype(tree, argument)
27902790
&& ((nch == 1) || (nch == 2) || (nch == 3)));
2791-
if (res)
2791+
if (res)
27922792
res = validate_test(CHILD(tree, 0));
27932793
if (res && (nch == 2))
27942794
res = validate_comp_for(CHILD(tree, 1));

Diff for: Modules/xxlimited.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ xx_roj(PyObject *self, PyObject *args)
169169

170170
/* ---------- */
171171

172-
static PyType_Slot Str_Type_slots[] = {
172+
static PyType_Slot Str_Type_slots[] = {
173173
{Py_tp_base, NULL}, /* filled out in module init function */
174174
{0, 0},
175175
};

Diff for: Objects/classobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ method_repr(PyMethodObject *a)
260260
PyErr_Clear();
261261
}
262262
}
263-
263+
264264
if (funcname != NULL && !PyUnicode_Check(funcname)) {
265265
Py_DECREF(funcname);
266266
funcname = NULL;

Diff for: Objects/iterobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ calliter_iternext(calliterobject *it)
212212
Py_DECREF(args);
213213
if (result != NULL) {
214214
int ok;
215-
ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
215+
ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
216216
if (ok == 0)
217217
return result; /* Common case, fast path */
218218
Py_DECREF(result);

Diff for: Objects/memoryobject.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ memory_from_contiguous_copy(Py_buffer *src, char order)
892892
The logical structure of the input and output buffers is the same
893893
(i.e. tolist(input) == tolist(output)), but the physical layout in
894894
memory can be explicitly chosen.
895-
895+
896896
As usual, if buffertype=PyBUF_WRITE, the exporter's buffer must be writable,
897897
otherwise it may be writable or read-only.
898898
@@ -1241,7 +1241,7 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
12411241
view->suboffsets = NULL;
12421242

12431243
init_flags(mv);
1244-
1244+
12451245
ret = 0;
12461246

12471247
out:
@@ -2288,7 +2288,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
22882288
{
22892289
Py_buffer *view;
22902290
view = &(self->view);
2291-
2291+
22922292
CHECK_RELEASED(self);
22932293

22942294
if (view->ndim == 0) {

Diff for: Objects/moduleobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module_init_dict(PyModuleObject *mod, PyObject *md_dict,
3737
_Py_IDENTIFIER(__package__);
3838
_Py_IDENTIFIER(__loader__);
3939
_Py_IDENTIFIER(__spec__);
40-
40+
4141
if (md_dict == NULL)
4242
return -1;
4343
if (doc == NULL)

Diff for: Objects/rangeobject.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ static PyObject *
987987
longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
988988
{
989989
int cmp;
990-
990+
991991
/* clip the value */
992992
PyObject *zero = PyLong_FromLong(0);
993993
if (zero == NULL)
@@ -1007,7 +1007,7 @@ longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
10071007
return NULL;
10081008
if (cmp > 0)
10091009
state = r->len;
1010-
1010+
10111011
Py_CLEAR(r->index);
10121012
r->index = state;
10131013
Py_INCREF(r->index);

Diff for: Objects/stringlib/transmogrify.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
5959

6060
j = 0;
6161
q = STRINGLIB_STR(u);
62-
62+
6363
for (p = STRINGLIB_STR(self); p < e; p++) {
6464
if (*p == '\t') {
6565
if (tabsize > 0) {

Diff for: Objects/unicodectype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define EXTENDED_CASE_MASK 0x4000
2828

2929
typedef struct {
30-
/*
30+
/*
3131
These are either deltas to the character or offsets in
3232
_PyUnicode_ExtendedCase.
3333
*/

Diff for: PC/launcher.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ error(int rc, wchar_t * format, ... )
9696
fwprintf(stderr, L"%ls\n", message);
9797
#else
9898
MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."),
99-
MB_OK);
99+
MB_OK);
100100
#endif
101101
ExitProcess(rc);
102102
}
@@ -349,7 +349,7 @@ locate_all_pythons()
349349
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY);
350350
locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY);
351351
}
352-
#endif
352+
#endif
353353
// now hit the "native" key for this process bittedness.
354354
debug(L"locating Pythons in native registry\n");
355355
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ);
@@ -604,7 +604,7 @@ run_child(wchar_t * cmdline)
604604
// window, or fetching a message). As this launcher doesn't do this
605605
// directly, that cursor remains even after the child process does these
606606
// things. We avoid that by doing a simple post+get message.
607-
// See http://bugs.python.org/issue17290 and
607+
// See http://bugs.python.org/issue17290 and
608608
// https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running
609609
MSG msg;
610610

0 commit comments

Comments
 (0)