]> granicus.if.org Git - python/commitdiff
Removed unintentional trailing spaces in non-external and non-generated C files.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 18 Mar 2015 19:53:15 +0000 (21:53 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 18 Mar 2015 19:53:15 +0000 (21:53 +0200)
25 files changed:
Doc/includes/noddy.c
Include/codecs.h
Include/sliceobject.h
Include/ucnhash.h
Modules/_bz2module.c
Modules/_io/bufferedio.c
Modules/_lzmamodule.c
Modules/_sqlite/microprotocols.h
Modules/_testbuffer.c
Modules/_testcapimodule.c
Modules/atexitmodule.c
Modules/parsermodule.c
Modules/xxlimited.c
Objects/classobject.c
Objects/iterobject.c
Objects/memoryobject.c
Objects/moduleobject.c
Objects/rangeobject.c
Objects/stringlib/transmogrify.h
Objects/unicodectype.c
PC/launcher.c
Python/ceval_gil.h
Python/condvar.h
Python/pyfpe.c
Python/pystate.c

index 8f79fcf6bf4c3c7b720cf88cb7d3205d1b8b977d..19a27a89e883b3b8045536b5dfab5ae5e2e12b22 100644 (file)
@@ -38,7 +38,7 @@ static PyModuleDef noddymodule = {
 };
 
 PyMODINIT_FUNC
-PyInit_noddy(void) 
+PyInit_noddy(void)
 {
     PyObject* m;
 
index 466913540fd44c8d430d8be465958f301aef9f5b..9e4f3050952d2959b5e34b0e2a67b61052c7d743 100644 (file)
@@ -71,7 +71,7 @@ PyAPI_FUNC(int) PyCodec_KnownEncoding(
    object is passed through the encoder function found for the given
    encoding using the error handling method defined by errors. errors
    may be NULL to use the default method defined for the codec.
-   
+
    Raises a LookupError in case no encoder can be found.
 
  */
@@ -87,7 +87,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode(
    object is passed through the decoder function found for the given
    encoding using the error handling method defined by errors. errors
    may be NULL to use the default method defined for the codec.
-   
+
    Raises a LookupError in case no encoder can be found.
 
  */
@@ -145,7 +145,7 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
 
 
 
-/* --- Codec Lookup APIs -------------------------------------------------- 
+/* --- Codec Lookup APIs --------------------------------------------------
 
    All APIs return a codec object with incremented refcount and are
    based on _PyCodec_Lookup().  The same comments w/r to the encoding
index f7ee90c3cc849b8ed3d5abd388ff9c67227f07f9..26370e0175716b3218ed935f9ce82136af6fc530 100644 (file)
@@ -41,7 +41,7 @@ PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length,
 PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length,
                                   Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
 PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,
-                                   Py_ssize_t *start, Py_ssize_t *stop, 
+                                   Py_ssize_t *start, Py_ssize_t *stop,
                                    Py_ssize_t *step, Py_ssize_t *slicelength);
 
 #ifdef __cplusplus
index 8de9ba0cff767da33bcb78e52716d53372abc789..45362e997dfa118f30d2c5bb4406105f744ce53b 100644 (file)
@@ -16,7 +16,7 @@ typedef struct {
     int size;
 
     /* Get name for a given character code.  Returns non-zero if
-       success, zero if not.  Does not set Python exceptions. 
+       success, zero if not.  Does not set Python exceptions.
        If self is NULL, data come from the default version of the database.
        If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */
     int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen,
index f284cd611d557e5ee56726e3d72544194108f01e..51da7aeaec18d70642bf8acc664301da4e072b3c 100644 (file)
@@ -666,7 +666,7 @@ _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self)
     self->unused_data = PyBytes_FromStringAndSize(NULL, 0);
     if (self->unused_data == NULL)
         goto error;
-    
+
     bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0);
     if (catch_bz2_error(bzerror))
         goto error;
index 370bb5ec453f0a17aedc0acc96fb8bbd252d8ddc..358a94dce270c0158b29ee48898af9d7dd79e06d 100644 (file)
@@ -1055,7 +1055,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
         }
         else
             n = 0;
-        
+
         if (n == 0 || (n == -2 && written > 0))
             break;
         if (n < 0) {
@@ -1065,7 +1065,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
             }
             goto end;
         }
-        
+
         /* At most one read in readinto1 mode */
         if (readinto1) {
             written += n;
index bae7df6e13072bfa374e82e33e23826df65d6c76..9abdf63c74ed1cbd2049c1255a8bf0f6511c6d8b 100644 (file)
@@ -149,10 +149,10 @@ grow_buffer(PyObject **buf, Py_ssize_t max_length)
 {
     Py_ssize_t size = PyBytes_GET_SIZE(*buf);
     Py_ssize_t newsize = size + (size >> 3) + 6;
-    
+
     if (max_length > 0 && newsize > max_length)
         newsize = max_length;
-    
+
     return _PyBytes_Resize(buf, newsize);
 }
 
@@ -906,7 +906,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
     Py_ssize_t data_size = 0;
     PyObject *result;
     lzma_stream *lzs = &d->lzs;
-    
+
     if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE)
         result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
     else
@@ -916,7 +916,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
 
     lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result);
     lzs->avail_out = PyBytes_GET_SIZE(result);
-    
+
     for (;;) {
         lzma_ret lzret;
 
@@ -947,7 +947,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
             goto error;
 
     return result;
-    
+
 error:
     Py_XDECREF(result);
     return NULL;
@@ -959,11 +959,11 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
     char input_buffer_in_use;
     PyObject *result;
     lzma_stream *lzs = &d->lzs;
-    
+
     /* Prepend unconsumed input if necessary */
     if (lzs->next_in != NULL) {
         size_t avail_now, avail_total;
-        
+
         /* Number of bytes we can append to input buffer */
         avail_now = (d->input_buffer + d->input_buffer_size)
             - (lzs->next_in + lzs->avail_in);
@@ -987,7 +987,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
             }
             d->input_buffer = tmp;
             d->input_buffer_size = new_size;
-            
+
             lzs->next_in = d->input_buffer + offset;
         }
         else if (avail_now < len) {
@@ -1054,7 +1054,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
             lzs->next_in = d->input_buffer;
         }
     }
-    
+
     return result;
 
 error:
@@ -1247,7 +1247,7 @@ Decompressor_dealloc(Decompressor *self)
 {
     if(self->input_buffer != NULL)
         PyMem_Free(self->input_buffer);
-    
+
     lzma_end(&self->lzs);
     Py_CLEAR(self->unused_data);
 #ifdef WITH_THREAD
index 3a9944fc794768cafbf2f7e37578896110039cc9..6941716c4cf73c71a46567451d067c7099e4fa15 100644 (file)
@@ -48,7 +48,7 @@ extern PyObject *pysqlite_microprotocols_adapt(
     PyObject *obj, PyObject *proto, PyObject *alt);
 
 extern PyObject *
-    pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);   
+    pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
 #define pysqlite_adapt_doc \
     "adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard."
 
index de7b567c6973d103eaae55313e355d4729403d71..43db8a8e53a34a3826c5517109f081d406b313fc 100644 (file)
@@ -190,7 +190,7 @@ ndbuf_delete(NDArrayObject *nd, ndbuf_t *elt)
         elt->prev->next = elt->next;
     else
         nd->head = elt->next;
-    
+
     if (elt->next)
         elt->next->prev = elt->prev;
 
@@ -767,7 +767,7 @@ out:
   +-----------------+-----------+-------------+----------------+
   | base.readonly   |     0     |     OK      |       OK       |
   +-----------------+-----------+-------------+----------------+
-  | base.format     |    NULL   |     OK      |       OK       |  
+  | base.format     |    NULL   |     OK      |       OK       |
   +-----------------+-----------+-------------+----------------+
   | base.ndim       |     1     |      1      |       OK       |
   +-----------------+-----------+-------------+----------------+
@@ -2018,7 +2018,7 @@ ndarray_get_obj(NDArrayObject *self, void *closure)
 {
     Py_buffer *base = &self->head->base;
 
-    if (base->obj == NULL) { 
+    if (base->obj == NULL) {
         Py_RETURN_NONE;
     }
     Py_INCREF(base->obj);
@@ -2558,7 +2558,7 @@ result:
     PyBuffer_Release(&v1);
     PyBuffer_Release(&v2);
 
-    ret = equal ? Py_True : Py_False; 
+    ret = equal ? Py_True : Py_False;
     Py_INCREF(ret);
     return ret;
 }
index a8ce0dc4eb3b91fdacc026c03124de763c8b5786..df35197198d6a20537218e6cb1134e73eb2d5475 100644 (file)
@@ -2476,7 +2476,7 @@ make_memoryview_from_NULL_pointer(PyObject *self)
         return NULL;
     return PyMemoryView_FromBuffer(&info);
 }
+
 static PyObject *
 test_from_contiguous(PyObject* self, PyObject *noargs)
 {
index 79e9962fc2a84168bc1e69b6c945a54ed51b05a8..739c18836f98310dfe4383d5a534469cd2046deb 100644 (file)
@@ -94,7 +94,7 @@ atexit_callfuncs(void)
             if (exc_type) {
                 Py_DECREF(exc_type);
                 Py_XDECREF(exc_value);
-                Py_XDECREF(exc_tb);    
+                Py_XDECREF(exc_tb);
             }
             PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
             if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
@@ -147,7 +147,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
     if (PyTuple_GET_SIZE(args) == 0) {
         PyErr_SetString(PyExc_TypeError,
                 "register() takes at least 1 argument (0 given)");
-        return NULL; 
+        return NULL;
     }
 
     func = PyTuple_GET_ITEM(args, 0);
@@ -159,7 +159,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
 
     new_callback = PyMem_Malloc(sizeof(atexit_callback));
     if (new_callback == NULL)
-        return PyErr_NoMemory();   
+        return PyErr_NoMemory();
 
     new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
     if (new_callback->args == NULL) {
@@ -336,7 +336,7 @@ PyInit_atexit(void)
     modstate = GET_ATEXIT_STATE(m);
     modstate->callback_len = 32;
     modstate->ncallbacks = 0;
-    modstate->atexit_callbacks = PyMem_New(atexit_callback*, 
+    modstate->atexit_callbacks = PyMem_New(atexit_callback*,
                                            modstate->callback_len);
     if (modstate->atexit_callbacks == NULL)
         return NULL;
index 36e9893da843184b028daa65980eb78799f4bfef..56ee445338539660be1a7096515661ad8e94bc81 100644 (file)
@@ -2788,7 +2788,7 @@ validate_argument(node *tree)
     int nch = NCH(tree);
     int res = (validate_ntype(tree, argument)
                && ((nch == 1) || (nch == 2) || (nch == 3)));
-    if (res) 
+    if (res)
         res = validate_test(CHILD(tree, 0));
     if (res && (nch == 2))
         res = validate_comp_for(CHILD(tree, 1));
index eecdab96975d28d4e8e2aa815a24fb5844035e14..7bfcb911e453b1ea370b06a1acb560459f229185 100644 (file)
@@ -169,7 +169,7 @@ xx_roj(PyObject *self, PyObject *args)
 
 /* ---------- */
 
-static PyType_Slot Str_Type_slots[] = {    
+static PyType_Slot Str_Type_slots[] = {
     {Py_tp_base, NULL}, /* filled out in module init function */
     {0, 0},
 };
index 07cb6395b414ffe77411d1b31030d28fb77a0eb4..5e8ac59df25dc9d6960c09702340e94973bcea0e 100644 (file)
@@ -260,7 +260,7 @@ method_repr(PyMethodObject *a)
             PyErr_Clear();
         }
     }
-    
+
     if (funcname != NULL && !PyUnicode_Check(funcname)) {
         Py_DECREF(funcname);
         funcname = NULL;
index 77ff8106fd214eb13a2b3075cfc95923cb7cc492..baa51da1a7597c3cfa1104f7bee54df978c0b21d 100644 (file)
@@ -212,7 +212,7 @@ calliter_iternext(calliterobject *it)
         Py_DECREF(args);
         if (result != NULL) {
             int ok;
-            ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);               
+            ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
             if (ok == 0)
                 return result; /* Common case, fast path */
             Py_DECREF(result);
index b611dc864ce3ef90875853fc0f16f712240148f7..6142b4cf739463adf223354526cd89f8d804b0bd 100644 (file)
@@ -892,7 +892,7 @@ memory_from_contiguous_copy(Py_buffer *src, char order)
    The logical structure of the input and output buffers is the same
    (i.e. tolist(input) == tolist(output)), but the physical layout in
    memory can be explicitly chosen.
+
    As usual, if buffertype=PyBUF_WRITE, the exporter's buffer must be writable,
    otherwise it may be writable or read-only.
 
@@ -1241,7 +1241,7 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
     view->suboffsets = NULL;
 
     init_flags(mv);
+
     ret = 0;
 
 out:
@@ -2288,7 +2288,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
 {
     Py_buffer *view;
     view = &(self->view);
-    
+
     CHECK_RELEASED(self);
 
     if (view->ndim == 0) {
index 441e73111b77f2cfffb7f891312ccca65937d473..dca5e58c44a3b1391bcd3a0234c725e10251a230 100644 (file)
@@ -37,7 +37,7 @@ module_init_dict(PyModuleObject *mod, PyObject *md_dict,
     _Py_IDENTIFIER(__package__);
     _Py_IDENTIFIER(__loader__);
     _Py_IDENTIFIER(__spec__);
-    
+
     if (md_dict == NULL)
         return -1;
     if (doc == NULL)
index 7e6c733f3e28e1cf2b3de3d420d0140296475ca4..0f8cd60a62050efb05d65d685754bec35b467c04 100644 (file)
@@ -987,7 +987,7 @@ static PyObject *
 longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
 {
     int cmp;
-   
+
     /* clip the value */
     PyObject *zero = PyLong_FromLong(0);
     if (zero == NULL)
@@ -1007,7 +1007,7 @@ longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
         return NULL;
     if (cmp > 0)
         state = r->len;
-    
+
     Py_CLEAR(r->index);
     r->index = state;
     Py_INCREF(r->index);
index cae6ea113a1dbea47272602d70bd28263290d3fd..b559b5356b8db543155d202833ba9d11d43d4a97 100644 (file)
@@ -59,7 +59,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
 
     j = 0;
     q = STRINGLIB_STR(u);
-    
+
     for (p = STRINGLIB_STR(self); p < e; p++) {
         if (*p == '\t') {
             if (tabsize > 0) {
index ea540d605def43dd59db3f610a40976d1846310d..d8c95c8b44cea71ec201812af4a0c4884b933555 100644 (file)
@@ -27,7 +27,7 @@
 #define EXTENDED_CASE_MASK 0x4000
 
 typedef struct {
-    /* 
+    /*
        These are either deltas to the character or offsets in
        _PyUnicode_ExtendedCase.
     */
index 1523020779068a7dbec344ed3d85deb99e5ee30a..fada4c9c16ad570617f9f1146dc2de2d1d2827ba 100644 (file)
@@ -96,7 +96,7 @@ error(int rc, wchar_t * format, ... )
     fwprintf(stderr, L"%ls\n", message);
 #else
     MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."),
-               MB_OK); 
+               MB_OK);
 #endif
     ExitProcess(rc);
 }
@@ -349,7 +349,7 @@ locate_all_pythons()
         locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY);
         locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY);
     }
-#endif    
+#endif
     // now hit the "native" key for this process bittedness.
     debug(L"locating Pythons in native registry\n");
     locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ);
@@ -604,7 +604,7 @@ run_child(wchar_t * cmdline)
     // window, or fetching a message).  As this launcher doesn't do this
     // directly, that cursor remains even after the child process does these
     // things.  We avoid that by doing a simple post+get message.
-    // See http://bugs.python.org/issue17290 and 
+    // See http://bugs.python.org/issue17290 and
     // https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running
     MSG msg;
 
index 4db56b6f5cb1346996f169d0c90fd0ad6033bf67..aafcbc2bc9c5f1a9119716f52650f9b761593de5 100644 (file)
@@ -31,7 +31,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
      variable (gil_drop_request) is used for that purpose, which is checked
      at every turn of the eval loop. That variable is set after a wait of
      `interval` microseconds on `gil_cond` has timed out.
-      
+
       [Actually, another volatile boolean variable (eval_breaker) is used
        which ORs several conditions into one. Volatile booleans are
        sufficient as inter-thread signalling means since Python is run
@@ -41,7 +41,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
      time (`interval` microseconds) before setting gil_drop_request. This
      encourages a defined switching period, but doesn't enforce it since
      opcodes can take an arbitrary time to execute.
+
      The `interval` value is available for the user to read and modify
      using the Python API `sys.{get,set}switchinterval()`.
 
@@ -51,7 +51,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
      the value of gil_last_holder is changed to something else than its
      own thread state pointer, indicating that another thread was able to
      take the GIL.
+
      This is meant to prohibit the latency-adverse behaviour on multi-core
      machines where one thread would speculatively release the GIL, but still
      run and end up being the first to re-acquire it, making the "timeslices"
@@ -186,7 +186,7 @@ static void drop_gil(PyThreadState *tstate)
     _Py_atomic_store_relaxed(&gil_locked, 0);
     COND_SIGNAL(gil_cond);
     MUTEX_UNLOCK(gil_mutex);
-    
+
 #ifdef FORCE_SWITCHING
     if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) {
         MUTEX_LOCK(switch_mutex);
@@ -215,7 +215,7 @@ static void take_gil(PyThreadState *tstate)
 
     if (!_Py_atomic_load_relaxed(&gil_locked))
         goto _ready;
-    
+
     while (_Py_atomic_load_relaxed(&gil_locked)) {
         int timed_out = 0;
         unsigned long saved_switchnum;
@@ -254,7 +254,7 @@ _ready:
     if (tstate->async_exc != NULL) {
         _PyEval_SignalAsyncExc();
     }
-    
+
     MUTEX_UNLOCK(gil_mutex);
     errno = err;
 }
index ef818c4d4b5ccbfb173d85a7fe67b56ebf1baf43..bb5b1b661f1c473ad068ab0b4fc5a9e93b9820e7 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Portable condition variable support for windows and pthreads.
  * Everything is inline, this header can be included where needed.
  *
@@ -105,7 +105,7 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, PY_LONG_LONG us)
         return 1;
     else if (r)
         return -1;
-    else 
+    else
         return 0;
 }
 
@@ -255,7 +255,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms)
          * a new thread comes along, it will pass right throuhgh, having
          * adjusted it to (waiting == 0 && sem.count == 0).
          */
-         
+
     if (wait == WAIT_FAILED)
         return -1;
     /* return 0 on success, 1 on timeout */
index 4b7f5bae1593215665ebf8f02869a7a83a573c2b..ab0ef83ead094acf287ca54cff1c33ed1630b895 100644 (file)
@@ -1,6 +1,6 @@
 #include "pyconfig.h"
 #include "pyfpe.h"
-/* 
+/*
  * The signal handler for SIGFPE is actually declared in an external
  * module fpectl, or as preferred by the user.  These variable
  * definitions are required in order to compile Python without
@@ -13,7 +13,7 @@ jmp_buf PyFPE_jbuf;
 int PyFPE_counter = 0;
 #endif
 
-/* Have this outside the above #ifdef, since some picky ANSI compilers issue a 
+/* Have this outside the above #ifdef, since some picky ANSI compilers issue a
    warning when compiling an empty file. */
 
 double
index ee1e469635d30b17957ac64e62b78ab93ffd1544..926ef07e211ee89527ac6d5a7f57796736e64c71 100644 (file)
@@ -228,7 +228,7 @@ new_threadstate(PyInterpreterState *interp, int init)
             tstate->next->prev = tstate;
         interp->tstate_head = tstate;
         HEAD_UNLOCK();
-        
+
 #if defined _MSC_VER && _MSC_VER >= 1900
         /* Issue #23524: Temporary fix to disable termination due to invalid parameters */
         _set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler);