[Python-checkins] cpython: Removed unintentional trailing spaces in non-external and non-generated C files.

serhiy.storchaka python-checkins at python.org
Wed Mar 18 20:53:48 CET 2015


https://hg.python.org/cpython/rev/008fc72fd94d
changeset:   95049:008fc72fd94d
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Wed Mar 18 21:53:15 2015 +0200
summary:
  Removed unintentional trailing spaces in non-external and non-generated C files.

files:
  Doc/includes/noddy.c             |   2 +-
  Include/codecs.h                 |   6 +++---
  Include/sliceobject.h            |   2 +-
  Include/ucnhash.h                |   2 +-
  Modules/_bz2module.c             |   2 +-
  Modules/_io/bufferedio.c         |   4 ++--
  Modules/_lzmamodule.c            |  20 ++++++++++----------
  Modules/_sqlite/microprotocols.h |   2 +-
  Modules/_testbuffer.c            |   8 ++++----
  Modules/_testcapimodule.c        |   2 +-
  Modules/atexitmodule.c           |   8 ++++----
  Modules/parsermodule.c           |   2 +-
  Modules/xxlimited.c              |   2 +-
  Objects/classobject.c            |   2 +-
  Objects/iterobject.c             |   2 +-
  Objects/memoryobject.c           |   6 +++---
  Objects/moduleobject.c           |   2 +-
  Objects/rangeobject.c            |   4 ++--
  Objects/stringlib/transmogrify.h |   2 +-
  Objects/unicodectype.c           |   2 +-
  PC/launcher.c                    |   6 +++---
  Python/ceval_gil.h               |  12 ++++++------
  Python/condvar.h                 |   6 +++---
  Python/pyfpe.c                   |   4 ++--
  Python/pystate.c                 |   2 +-
  25 files changed, 56 insertions(+), 56 deletions(-)


diff --git a/Doc/includes/noddy.c b/Doc/includes/noddy.c
--- a/Doc/includes/noddy.c
+++ b/Doc/includes/noddy.c
@@ -38,7 +38,7 @@
 };
 
 PyMODINIT_FUNC
-PyInit_noddy(void) 
+PyInit_noddy(void)
 {
     PyObject* m;
 
diff --git a/Include/codecs.h b/Include/codecs.h
--- a/Include/codecs.h
+++ b/Include/codecs.h
@@ -71,7 +71,7 @@
    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 @@
    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 @@
 
 
 
-/* --- 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
diff --git a/Include/sliceobject.h b/Include/sliceobject.h
--- a/Include/sliceobject.h
+++ b/Include/sliceobject.h
@@ -41,7 +41,7 @@
 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
diff --git a/Include/ucnhash.h b/Include/ucnhash.h
--- a/Include/ucnhash.h
+++ b/Include/ucnhash.h
@@ -16,7 +16,7 @@
     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,
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c
--- a/Modules/_bz2module.c
+++ b/Modules/_bz2module.c
@@ -666,7 +666,7 @@
     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;
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -1055,7 +1055,7 @@
         }
         else
             n = 0;
-        
+
         if (n == 0 || (n == -2 && written > 0))
             break;
         if (n < 0) {
@@ -1065,7 +1065,7 @@
             }
             goto end;
         }
-        
+
         /* At most one read in readinto1 mode */
         if (readinto1) {
             written += n;
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -149,10 +149,10 @@
 {
     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 @@
     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 @@
 
     lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result);
     lzs->avail_out = PyBytes_GET_SIZE(result);
-    
+
     for (;;) {
         lzma_ret lzret;
 
@@ -947,7 +947,7 @@
             goto error;
 
     return result;
-    
+
 error:
     Py_XDECREF(result);
     return NULL;
@@ -959,11 +959,11 @@
     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 @@
             }
             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 @@
             lzs->next_in = d->input_buffer;
         }
     }
-    
+
     return result;
 
 error:
@@ -1247,7 +1247,7 @@
 {
     if(self->input_buffer != NULL)
         PyMem_Free(self->input_buffer);
-    
+
     lzma_end(&self->lzs);
     Py_CLEAR(self->unused_data);
 #ifdef WITH_THREAD
diff --git a/Modules/_sqlite/microprotocols.h b/Modules/_sqlite/microprotocols.h
--- a/Modules/_sqlite/microprotocols.h
+++ b/Modules/_sqlite/microprotocols.h
@@ -48,7 +48,7 @@
     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."
 
diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c
--- a/Modules/_testbuffer.c
+++ b/Modules/_testbuffer.c
@@ -190,7 +190,7 @@
         elt->prev->next = elt->next;
     else
         nd->head = elt->next;
-    
+
     if (elt->next)
         elt->next->prev = elt->prev;
 
@@ -767,7 +767,7 @@
   +-----------------+-----------+-------------+----------------+
   | base.readonly   |     0     |     OK      |       OK       |
   +-----------------+-----------+-------------+----------------+
-  | base.format     |    NULL   |     OK      |       OK       |  
+  | base.format     |    NULL   |     OK      |       OK       |
   +-----------------+-----------+-------------+----------------+
   | base.ndim       |     1     |      1      |       OK       |
   +-----------------+-----------+-------------+----------------+
@@ -2018,7 +2018,7 @@
 {
     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 @@
     PyBuffer_Release(&v1);
     PyBuffer_Release(&v2);
 
-    ret = equal ? Py_True : Py_False; 
+    ret = equal ? Py_True : Py_False;
     Py_INCREF(ret);
     return ret;
 }
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2476,7 +2476,7 @@
         return NULL;
     return PyMemoryView_FromBuffer(&info);
 }
- 
+
 static PyObject *
 test_from_contiguous(PyObject* self, PyObject *noargs)
 {
diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c
--- a/Modules/atexitmodule.c
+++ b/Modules/atexitmodule.c
@@ -94,7 +94,7 @@
             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 @@
     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 @@
 
     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 @@
     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;
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -2788,7 +2788,7 @@
     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));
diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c
--- a/Modules/xxlimited.c
+++ b/Modules/xxlimited.c
@@ -169,7 +169,7 @@
 
 /* ---------- */
 
-static PyType_Slot Str_Type_slots[] = {    
+static PyType_Slot Str_Type_slots[] = {
     {Py_tp_base, NULL}, /* filled out in module init function */
     {0, 0},
 };
diff --git a/Objects/classobject.c b/Objects/classobject.c
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -260,7 +260,7 @@
             PyErr_Clear();
         }
     }
-    
+
     if (funcname != NULL && !PyUnicode_Check(funcname)) {
         Py_DECREF(funcname);
         funcname = NULL;
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -212,7 +212,7 @@
         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);
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -892,7 +892,7 @@
    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 @@
     view->suboffsets = NULL;
 
     init_flags(mv);
- 
+
     ret = 0;
 
 out:
@@ -2288,7 +2288,7 @@
 {
     Py_buffer *view;
     view = &(self->view);
-    
+
     CHECK_RELEASED(self);
 
     if (view->ndim == 0) {
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -37,7 +37,7 @@
     _Py_IDENTIFIER(__package__);
     _Py_IDENTIFIER(__loader__);
     _Py_IDENTIFIER(__spec__);
-    
+
     if (md_dict == NULL)
         return -1;
     if (doc == NULL)
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -987,7 +987,7 @@
 longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
 {
     int cmp;
-   
+
     /* clip the value */
     PyObject *zero = PyLong_FromLong(0);
     if (zero == NULL)
@@ -1007,7 +1007,7 @@
         return NULL;
     if (cmp > 0)
         state = r->len;
-    
+
     Py_CLEAR(r->index);
     r->index = state;
     Py_INCREF(r->index);
diff --git a/Objects/stringlib/transmogrify.h b/Objects/stringlib/transmogrify.h
--- a/Objects/stringlib/transmogrify.h
+++ b/Objects/stringlib/transmogrify.h
@@ -59,7 +59,7 @@
 
     j = 0;
     q = STRINGLIB_STR(u);
-    
+
     for (p = STRINGLIB_STR(self); p < e; p++) {
         if (*p == '\t') {
             if (tabsize > 0) {
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
--- a/Objects/unicodectype.c
+++ b/Objects/unicodectype.c
@@ -27,7 +27,7 @@
 #define EXTENDED_CASE_MASK 0x4000
 
 typedef struct {
-    /* 
+    /*
        These are either deltas to the character or offsets in
        _PyUnicode_ExtendedCase.
     */
diff --git a/PC/launcher.c b/PC/launcher.c
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -96,7 +96,7 @@
     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_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 @@
     // 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;
 
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -31,7 +31,7 @@
      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 @@
      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 @@
      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 @@
     _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 @@
 
     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 @@
     if (tstate->async_exc != NULL) {
         _PyEval_SignalAsyncExc();
     }
-    
+
     MUTEX_UNLOCK(gil_mutex);
     errno = err;
 }
diff --git a/Python/condvar.h b/Python/condvar.h
--- a/Python/condvar.h
+++ b/Python/condvar.h
@@ -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 @@
         return 1;
     else if (r)
         return -1;
-    else 
+    else
         return 0;
 }
 
@@ -255,7 +255,7 @@
          * 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 */
diff --git a/Python/pyfpe.c b/Python/pyfpe.c
--- a/Python/pyfpe.c
+++ b/Python/pyfpe.c
@@ -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 @@
 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
diff --git a/Python/pystate.c b/Python/pystate.c
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -228,7 +228,7 @@
             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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list