[Python-checkins] cpython (2.7): Issue #28139: Fix messed up indentation

martin.panter python-checkins at python.org
Sat Sep 17 04:02:57 EDT 2016


https://hg.python.org/cpython/rev/a2bfec367cef
changeset:   103874:a2bfec367cef
branch:      2.7
parent:      103871:4030300fcb18
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Sep 17 07:54:55 2016 +0000
summary:
  Issue #28139: Fix messed up indentation

Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.

files:
  Include/unicodeobject.h               |    2 +-
  Mac/Modules/cf/_CFmodule.c            |    5 +-
  Mac/Modules/ctl/_Ctlmodule.c          |    6 +-
  Mac/Modules/dlg/_Dlgmodule.c          |    6 +-
  Mac/Modules/drag/_Dragmodule.c        |    6 +-
  Mac/Modules/evt/_Evtmodule.c          |    6 +-
  Mac/Modules/file/_Filemodule.c        |    6 +-
  Mac/Modules/fm/_Fmmodule.c            |    6 +-
  Mac/Modules/folder/_Foldermodule.c    |    6 +-
  Mac/Modules/help/_Helpmodule.c        |    6 +-
  Mac/Modules/icn/_Icnmodule.c          |    6 +-
  Mac/Modules/launch/_Launchmodule.c    |    6 +-
  Mac/Modules/list/_Listmodule.c        |    6 +-
  Mac/Modules/menu/_Menumodule.c        |    6 +-
  Mac/Modules/mlte/_Mltemodule.c        |    6 +-
  Mac/Modules/osa/_OSAmodule.c          |    6 +-
  Mac/Modules/qd/_Qdmodule.c            |    6 +-
  Mac/Modules/qdoffs/_Qdoffsmodule.c    |    6 +-
  Mac/Modules/qt/_Qtmodule.c            |    6 +-
  Mac/Modules/res/_Resmodule.c          |    6 +-
  Mac/Modules/scrap/_Scrapmodule.c      |    6 +-
  Mac/Modules/snd/_Sndmodule.c          |    6 +-
  Mac/Modules/te/_TEmodule.c            |    6 +-
  Mac/Modules/win/_Winmodule.c          |    6 +-
  Modules/_ctypes/_ctypes.c             |   40 ++--
  Modules/_localemodule.c               |    9 +-
  Modules/_multiprocessing/connection.h |    8 +-
  Modules/binascii.c                    |    2 +-
  Modules/bsddbmodule.c                 |    2 +-
  Modules/cPickle.c                     |  108 +++++++-------
  Modules/cStringIO.c                   |   16 +-
  Modules/clmodule.c                    |    2 +-
  Modules/dlmodule.c                    |    2 +-
  Modules/fcntlmodule.c                 |    2 +-
  Modules/flmodule.c                    |    9 +-
  Modules/fmmodule.c                    |    3 +-
  Modules/glmodule.c                    |    3 +-
  Modules/main.c                        |   18 +-
  Modules/signalmodule.c                |   26 +-
  Modules/socketmodule.c                |   11 +-
  Modules/timingmodule.c                |    2 +-
  Objects/complexobject.c               |   48 +++---
  Objects/funcobject.c                  |   20 +-
  Objects/intobject.c                   |    4 +-
  Objects/rangeobject.c                 |    6 +-
  Objects/stringobject.c                |    4 +-
  PC/bdist_wininst/install.c            |   18 +-
  PC/os2vacpp/getpathp.c                |   18 +-
  Python/bltinmodule.c                  |   66 ++++----
  Python/mactoolboxglue.c               |   20 +-
  Python/thread_wince.h                 |   10 +-
  RISCOS/Modules/riscosmodule.c         |    2 +-
  52 files changed, 309 insertions(+), 309 deletions(-)


diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -395,7 +395,7 @@
 
 #define Py_UNICODE_FILL(target, value, length) \
     do {Py_ssize_t i_; Py_UNICODE *t_ = (target); Py_UNICODE v_ = (value);\
-    for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\
+        for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\
     } while (0)
 
 /* Check if substring matches at given offset.  the offset must be
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c
--- a/Mac/Modules/cf/_CFmodule.c
+++ b/Mac/Modules/cf/_CFmodule.c
@@ -83,7 +83,6 @@
 */
 PyObject *CFRange_New(CFRange *itself)
 {
-
     return Py_BuildValue("ll", (long)itself->location, (long)itself->length);
 }
 
@@ -104,8 +103,8 @@
 OptionalCFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
 {
     if ( v == Py_None ) {
-    p_itself = NULL;
-    return 1;
+        p_itself = NULL;
+        return 1;
     }
     return CFURLRefObj_Convert(v, p_itself);
 }
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -8,9 +8,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c
--- a/Mac/Modules/drag/_Dragmodule.c
+++ b/Mac/Modules/drag/_Dragmodule.c
@@ -8,9 +8,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c
--- a/Mac/Modules/evt/_Evtmodule.c
+++ b/Mac/Modules/evt/_Evtmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c
--- a/Mac/Modules/file/_Filemodule.c
+++ b/Mac/Modules/file/_Filemodule.c
@@ -13,9 +13,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c
--- a/Mac/Modules/fm/_Fmmodule.c
+++ b/Mac/Modules/fm/_Fmmodule.c
@@ -11,9 +11,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/folder/_Foldermodule.c b/Mac/Modules/folder/_Foldermodule.c
--- a/Mac/Modules/folder/_Foldermodule.c
+++ b/Mac/Modules/folder/_Foldermodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c
--- a/Mac/Modules/help/_Helpmodule.c
+++ b/Mac/Modules/help/_Helpmodule.c
@@ -8,9 +8,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c
--- a/Mac/Modules/launch/_Launchmodule.c
+++ b/Mac/Modules/launch/_Launchmodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c
--- a/Mac/Modules/list/_Listmodule.c
+++ b/Mac/Modules/list/_Listmodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/menu/_Menumodule.c b/Mac/Modules/menu/_Menumodule.c
--- a/Mac/Modules/menu/_Menumodule.c
+++ b/Mac/Modules/menu/_Menumodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/osa/_OSAmodule.c b/Mac/Modules/osa/_OSAmodule.c
--- a/Mac/Modules/osa/_OSAmodule.c
+++ b/Mac/Modules/osa/_OSAmodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c
--- a/Mac/Modules/qd/_Qdmodule.c
+++ b/Mac/Modules/qd/_Qdmodule.c
@@ -11,9 +11,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c
--- a/Mac/Modules/qdoffs/_Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/_Qdoffsmodule.c
@@ -11,9 +11,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
--- a/Mac/Modules/qt/_Qtmodule.c
+++ b/Mac/Modules/qt/_Qtmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.c
@@ -8,9 +8,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/scrap/_Scrapmodule.c b/Mac/Modules/scrap/_Scrapmodule.c
--- a/Mac/Modules/scrap/_Scrapmodule.c
+++ b/Mac/Modules/scrap/_Scrapmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c
--- a/Mac/Modules/te/_TEmodule.c
+++ b/Mac/Modules/te/_TEmodule.c
@@ -10,9 +10,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -9,9 +9,9 @@
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-    PyErr_SetString(PyExc_NotImplementedError, \
-    "Not available in this shared library/OS version"); \
-    return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+            "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -5396,11 +5396,11 @@
 
     a = PySequence_GetSlice(args, 1, PySequence_Size(args));
     if (!a)
-    return NULL;
+        return NULL;
     status = PyObject_SetAttrString(self, "args", a);
     Py_DECREF(a);
     if (status < 0)
-    return NULL;
+        return NULL;
 
     if (PyObject_SetAttrString(self, "hresult", hresult) < 0)
         return NULL;
@@ -5755,25 +5755,25 @@
     PyUnicodeObject *unicode;
 
     if (w == NULL) {
-    PyErr_BadInternalCall();
-    return NULL;
+        PyErr_BadInternalCall();
+        return NULL;
     }
 
     unicode = (PyUnicodeObject *)PyUnicode_FromUnicode(NULL, size);
     if (!unicode)
-    return NULL;
+        return NULL;
 
     /* Copy the wchar_t data into the new object */
 #ifdef HAVE_USABLE_WCHAR_T
     memcpy(unicode->str, w, size * sizeof(wchar_t));
 #else
     {
-    register Py_UNICODE *u;
-    register int i;
-    u = PyUnicode_AS_UNICODE(unicode);
-    /* In Python, the following line has a one-off error */
-    for (i = size; i > 0; i--)
-        *u++ = *w++;
+        register Py_UNICODE *u;
+        register int i;
+        u = PyUnicode_AS_UNICODE(unicode);
+        /* In Python, the following line has a one-off error */
+        for (i = size; i > 0; i--)
+            *u++ = *w++;
     }
 #endif
 
@@ -5785,21 +5785,21 @@
                             Py_ssize_t size)
 {
     if (unicode == NULL) {
-    PyErr_BadInternalCall();
-    return -1;
+        PyErr_BadInternalCall();
+        return -1;
     }
     if (size > PyUnicode_GET_SIZE(unicode))
-    size = PyUnicode_GET_SIZE(unicode);
+        size = PyUnicode_GET_SIZE(unicode);
 #ifdef HAVE_USABLE_WCHAR_T
     memcpy(w, unicode->str, size * sizeof(wchar_t));
 #else
     {
-    register Py_UNICODE *u;
-    register int i;
-    u = PyUnicode_AS_UNICODE(unicode);
-    /* In Python, the following line has a one-off error */
-    for (i = size; i > 0; i--)
-        *w++ = *u++;
+        register Py_UNICODE *u;
+        register int i;
+        u = PyUnicode_AS_UNICODE(unicode);
+        /* In Python, the following line has a one-off error */
+        for (i = size; i > 0; i--)
+            *w++ = *u++;
     }
 #endif
 
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -57,9 +57,10 @@
     int i;
     PyObject *result, *val = NULL;
 
-    if (s[0] == '\0')
-    /* empty string: no grouping at all */
-    return PyList_New(0);
+    if (s[0] == '\0') {
+        /* empty string: no grouping at all */
+        return PyList_New(0);
+    }
 
     for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++)
         ; /* nothing */
@@ -534,7 +535,7 @@
 {
     int item, i;
     if (!PyArg_ParseTuple(args, "i:nl_langinfo", &item))
-    return NULL;
+        return NULL;
     /* Check whether this is a supported constant. GNU libc sometimes
        returns numeric values in the char* return value, which would
        crash PyString_FromString.  */
diff --git a/Modules/_multiprocessing/connection.h b/Modules/_multiprocessing/connection.h
--- a/Modules/_multiprocessing/connection.h
+++ b/Modules/_multiprocessing/connection.h
@@ -19,14 +19,14 @@
 
 #define CHECK_READABLE(self) \
     if (!(self->flags & READABLE)) { \
-    PyErr_SetString(PyExc_IOError, "connection is write-only"); \
-    return NULL; \
+        PyErr_SetString(PyExc_IOError, "connection is write-only"); \
+        return NULL; \
     }
 
 #define CHECK_WRITABLE(self) \
     if (!(self->flags & WRITABLE)) { \
-    PyErr_SetString(PyExc_IOError, "connection is read-only"); \
-    return NULL; \
+        PyErr_SetString(PyExc_IOError, "connection is read-only"); \
+        return NULL; \
     }
 
 /*
diff --git a/Modules/binascii.c b/Modules/binascii.c
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -880,7 +880,7 @@
     int signed_val;
 
     if (!PyArg_ParseTuple(args, "s*|I:crc32", &pbuf, &crc32val))
-    return NULL;
+        return NULL;
     /* In Python 2.x we return a signed integer regardless of native platform
      * long size (the 32bit unsigned long is treated as 32-bit signed and sign
      * extended into a 64-bit long inside the integer object).  3.0 does the
diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c
--- a/Modules/bsddbmodule.c
+++ b/Modules/bsddbmodule.c
@@ -851,7 +851,7 @@
 
     if (PyErr_WarnPy3k("the bsddb185 module has been removed in "
                        "Python 3.0", 2) < 0)
-    return;
+        return;
 
     Bsddbtype.ob_type = &PyType_Type;
     m = Py_InitModule("bsddb185", bsddbmodule_methods);
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -1323,71 +1323,71 @@
 #endif
 
     if (size > PY_SSIZE_T_MAX / expandsize)
-    return PyErr_NoMemory();
+        return PyErr_NoMemory();
 
     repr = PyString_FromStringAndSize(NULL, expandsize * size);
     if (repr == NULL)
-    return NULL;
+        return NULL;
     if (size == 0)
-    return repr;
+        return repr;
 
     p = q = PyString_AS_STRING(repr);
     while (size-- > 0) {
-    Py_UNICODE ch = *s++;
+        Py_UNICODE ch = *s++;
 #ifdef Py_UNICODE_WIDE
-    /* Map 32-bit characters to '\Uxxxxxxxx' */
-    if (ch >= 0x10000) {
-        *p++ = '\\';
-        *p++ = 'U';
-        *p++ = hexdigit[(ch >> 28) & 0xf];
-        *p++ = hexdigit[(ch >> 24) & 0xf];
-        *p++ = hexdigit[(ch >> 20) & 0xf];
-        *p++ = hexdigit[(ch >> 16) & 0xf];
-        *p++ = hexdigit[(ch >> 12) & 0xf];
-        *p++ = hexdigit[(ch >> 8) & 0xf];
-        *p++ = hexdigit[(ch >> 4) & 0xf];
-        *p++ = hexdigit[ch & 15];
-    }
-    else
+        /* Map 32-bit characters to '\Uxxxxxxxx' */
+        if (ch >= 0x10000) {
+            *p++ = '\\';
+            *p++ = 'U';
+            *p++ = hexdigit[(ch >> 28) & 0xf];
+            *p++ = hexdigit[(ch >> 24) & 0xf];
+            *p++ = hexdigit[(ch >> 20) & 0xf];
+            *p++ = hexdigit[(ch >> 16) & 0xf];
+            *p++ = hexdigit[(ch >> 12) & 0xf];
+            *p++ = hexdigit[(ch >> 8) & 0xf];
+            *p++ = hexdigit[(ch >> 4) & 0xf];
+            *p++ = hexdigit[ch & 15];
+        }
+        else
 #else
-    /* Map UTF-16 surrogate pairs to '\U00xxxxxx' */
-    if (ch >= 0xD800 && ch < 0xDC00) {
-        Py_UNICODE ch2;
-        Py_UCS4 ucs;
-
-        ch2 = *s++;
-        size--;
-        if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
-        ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
-        *p++ = '\\';
-        *p++ = 'U';
-        *p++ = hexdigit[(ucs >> 28) & 0xf];
-        *p++ = hexdigit[(ucs >> 24) & 0xf];
-        *p++ = hexdigit[(ucs >> 20) & 0xf];
-        *p++ = hexdigit[(ucs >> 16) & 0xf];
-        *p++ = hexdigit[(ucs >> 12) & 0xf];
-        *p++ = hexdigit[(ucs >> 8) & 0xf];
-        *p++ = hexdigit[(ucs >> 4) & 0xf];
-        *p++ = hexdigit[ucs & 0xf];
-        continue;
+        /* Map UTF-16 surrogate pairs to '\U00xxxxxx' */
+        if (ch >= 0xD800 && ch < 0xDC00) {
+            Py_UNICODE ch2;
+            Py_UCS4 ucs;
+
+            ch2 = *s++;
+            size--;
+            if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
+                ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
+                *p++ = '\\';
+                *p++ = 'U';
+                *p++ = hexdigit[(ucs >> 28) & 0xf];
+                *p++ = hexdigit[(ucs >> 24) & 0xf];
+                *p++ = hexdigit[(ucs >> 20) & 0xf];
+                *p++ = hexdigit[(ucs >> 16) & 0xf];
+                *p++ = hexdigit[(ucs >> 12) & 0xf];
+                *p++ = hexdigit[(ucs >> 8) & 0xf];
+                *p++ = hexdigit[(ucs >> 4) & 0xf];
+                *p++ = hexdigit[ucs & 0xf];
+                continue;
+            }
+            /* Fall through: isolated surrogates are copied as-is */
+            s--;
+            size++;
         }
-        /* Fall through: isolated surrogates are copied as-is */
-        s--;
-        size++;
-    }
 #endif
-    /* Map 16-bit characters to '\uxxxx' */
-    if (ch >= 256 || ch == '\\' || ch == '\n') {
-        *p++ = '\\';
-        *p++ = 'u';
-        *p++ = hexdigit[(ch >> 12) & 0xf];
-        *p++ = hexdigit[(ch >> 8) & 0xf];
-        *p++ = hexdigit[(ch >> 4) & 0xf];
-        *p++ = hexdigit[ch & 15];
-    }
-    /* Copy everything else as-is */
-    else
-        *p++ = (char) ch;
+        /* Map 16-bit characters to '\uxxxx' */
+        if (ch >= 256 || ch == '\\' || ch == '\n') {
+            *p++ = '\\';
+            *p++ = 'u';
+            *p++ = hexdigit[(ch >> 12) & 0xf];
+            *p++ = hexdigit[(ch >> 8) & 0xf];
+            *p++ = hexdigit[(ch >> 4) & 0xf];
+            *p++ = hexdigit[ch & 15];
+        }
+        /* Copy everything else as-is */
+        else
+            *p++ = (char) ch;
     }
     *p = '\0';
     _PyString_Resize(&repr, p - q);
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -496,17 +496,17 @@
             Py_DECREF(it);
             Py_DECREF(s);
             return NULL;
-           }
-           Py_DECREF(s);
-       }
+        }
+        Py_DECREF(s);
+    }
 
-       Py_DECREF(it);
+    Py_DECREF(it);
 
-       /* See if PyIter_Next failed */
-       if (PyErr_Occurred())
-           return NULL;
+    /* See if PyIter_Next failed */
+    if (PyErr_Occurred())
+        return NULL;
 
-       Py_RETURN_NONE;
+    Py_RETURN_NONE;
 }
 static struct PyMethodDef O_methods[] = {
   /* Common methods: */
diff --git a/Modules/clmodule.c b/Modules/clmodule.c
--- a/Modules/clmodule.c
+++ b/Modules/clmodule.c
@@ -964,7 +964,7 @@
 
     if (PyErr_WarnPy3k("the cl module has been removed in "
                        "Python 3.0", 2) < 0)
-    return;
+        return;
 
     m = Py_InitModule("cl", cl_methods);
     if (m == NULL)
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -240,7 +240,7 @@
 
     if (PyErr_WarnPy3k("the dl module has been removed in "
                         "Python 3.0; use the ctypes module instead", 2) < 0)
-    return;
+        return;
 
     /* Initialize object type */
     Py_TYPE(&Dltype) = &PyType_Type;
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -21,7 +21,7 @@
     int fd = PyObject_AsFileDescriptor(object);
 
     if (fd < 0)
-    return 0;
+        return 0;
     *target = fd;
     return 1;
 }
diff --git a/Modules/flmodule.c b/Modules/flmodule.c
--- a/Modules/flmodule.c
+++ b/Modules/flmodule.c
@@ -151,9 +151,9 @@
         g->ob_callback_arg = NULL;
     }
     else {
-    PyObject *a, *b;
-    if (!PyArg_UnpackTuple(args, "set_call_back", 2, 2, &a, &b))
-        return NULL;
+        PyObject *a, *b;
+        if (!PyArg_UnpackTuple(args, "set_call_back", 2, 2, &a, &b))
+            return NULL;
         Py_XDECREF(g->ob_callback);
         Py_XDECREF(g->ob_callback_arg);
         g->ob_callback = a;
@@ -2124,10 +2124,9 @@
 PyMODINIT_FUNC
 initfl(void)
 {
-
     if (PyErr_WarnPy3k("the fl module has been removed in "
                        "Python 3.0", 2) < 0)
-    return;
+        return;
 
     Py_InitModule("fl", forms_methods);
     if (m == NULL)
diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c
--- a/Modules/fmmodule.c
+++ b/Modules/fmmodule.c
@@ -257,10 +257,9 @@
 void
 initfm(void)
 {
-
     if (PyErr_WarnPy3k("the fm module has been removed in "
                        "Python 3.0", 2) < 0)
-    return;
+        return;
 
     Py_InitModule("fm", fm_methods);
     if (m == NULL)
diff --git a/Modules/glmodule.c b/Modules/glmodule.c
--- a/Modules/glmodule.c
+++ b/Modules/glmodule.c
@@ -7624,10 +7624,9 @@
 void
 initgl(void)
 {
-
     if (PyErr_WarnPy3k("the gl module has been removed in "
                        "Python 3.0", 2) < 0)
-    return;
+        return;
 
     (void) Py_InitModule("gl", gl_methods);
 }
diff --git a/Modules/main.c b/Modules/main.c
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -153,15 +153,15 @@
             (void) PyRun_SimpleFileExFlags(fp, startup, 0, cf);
             PyErr_Clear();
             fclose(fp);
-           } else {
-                    int save_errno;
-                    save_errno = errno;
-                    PySys_WriteStderr("Could not open PYTHONSTARTUP\n");
-                    errno = save_errno;
-                    PyErr_SetFromErrnoWithFilename(PyExc_IOError,
-                                                   startup);
-                    PyErr_Print();
-                    PyErr_Clear();
+        } else {
+            int save_errno;
+            save_errno = errno;
+            PySys_WriteStderr("Could not open PYTHONSTARTUP\n");
+            errno = save_errno;
+            PyErr_SetFromErrnoWithFilename(PyExc_IOError,
+                                           startup);
+            PyErr_Print();
+            PyErr_Clear();
         }
     }
 }
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -126,18 +126,18 @@
 
     r = PyTuple_New(2);
     if (r == NULL)
-    return NULL;
+        return NULL;
 
     if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) {
-    Py_DECREF(r);
-    return NULL;
+        Py_DECREF(r);
+        return NULL;
     }
 
     PyTuple_SET_ITEM(r, 0, v);
 
     if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) {
-    Py_DECREF(r);
-    return NULL;
+        Py_DECREF(r);
+        return NULL;
     }
 
     PyTuple_SET_ITEM(r, 1, v);
@@ -455,14 +455,14 @@
     struct itimerval new, old;
 
     if(!PyArg_ParseTuple(args, "id|d:setitimer", &which, &first, &interval))
-    return NULL;
+        return NULL;
 
     timeval_from_double(first, &new.it_value);
     timeval_from_double(interval, &new.it_interval);
     /* Let OS check "which" value */
     if (setitimer(which, &new, &old) != 0) {
-    PyErr_SetFromErrno(ItimerError);
-    return NULL;
+        PyErr_SetFromErrno(ItimerError);
+        return NULL;
     }
 
     return itimer_retval(&old);
@@ -488,11 +488,11 @@
     struct itimerval old;
 
     if (!PyArg_ParseTuple(args, "i:getitimer", &which))
-    return NULL;
+        return NULL;
 
     if (getitimer(which, &old) != 0) {
-    PyErr_SetFromErrno(ItimerError);
-    return NULL;
+        PyErr_SetFromErrno(ItimerError);
+        return NULL;
     }
 
     return itimer_retval(&old);
@@ -834,9 +834,9 @@
 
 #if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER)
     ItimerError = PyErr_NewException("signal.ItimerError",
-     PyExc_IOError, NULL);
+            PyExc_IOError, NULL);
     if (ItimerError != NULL)
-    PyDict_SetItemString(d, "ItimerError", ItimerError);
+        PyDict_SetItemString(d, "ItimerError", ItimerError);
 #endif
 
 #ifdef CTRL_C_EVENT
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1637,12 +1637,13 @@
         return 1;
     }
 #endif /* AF_UNIX */
+
 #if defined(AF_NETLINK)
-       case AF_NETLINK:
-       {
-           *len_ret = sizeof (struct sockaddr_nl);
-           return 1;
-       }
+    case AF_NETLINK:
+    {
+        *len_ret = sizeof (struct sockaddr_nl);
+        return 1;
+    }
 #endif
 
     case AF_INET:
diff --git a/Modules/timingmodule.c b/Modules/timingmodule.c
--- a/Modules/timingmodule.c
+++ b/Modules/timingmodule.c
@@ -56,7 +56,7 @@
 {
     if (PyErr_WarnPy3k("the timing module has been removed in "
                         "Python 3.0; use time.clock() instead", 2) < 0)
-    return;
+        return;
 
     (void)Py_InitModule("timing", timing_methods);
 }
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -495,20 +495,20 @@
 
     pc->real = pc->imag = 0.0;
     if (PyInt_Check(obj)) {
-    pc->real = PyInt_AS_LONG(obj);
-    return 0;
+        pc->real = PyInt_AS_LONG(obj);
+        return 0;
     }
     if (PyLong_Check(obj)) {
-    pc->real = PyLong_AsDouble(obj);
-    if (pc->real == -1.0 && PyErr_Occurred()) {
-        *pobj = NULL;
-        return -1;
-    }
-    return 0;
+        pc->real = PyLong_AsDouble(obj);
+        if (pc->real == -1.0 && PyErr_Occurred()) {
+            *pobj = NULL;
+            return -1;
+        }
+        return 0;
     }
     if (PyFloat_Check(obj)) {
-    pc->real = PyFloat_AsDouble(obj);
-    return 0;
+        pc->real = PyFloat_AsDouble(obj);
+        return 0;
     }
     Py_INCREF(Py_NotImplemented);
     *pobj = Py_NotImplemented;
@@ -909,25 +909,25 @@
     PyObject *format_spec;
 
     if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
-    return NULL;
+        return NULL;
     if (PyBytes_Check(format_spec))
-    return _PyComplex_FormatAdvanced(self,
-                                     PyBytes_AS_STRING(format_spec),
-                                     PyBytes_GET_SIZE(format_spec));
+        return _PyComplex_FormatAdvanced(self,
+                                         PyBytes_AS_STRING(format_spec),
+                                         PyBytes_GET_SIZE(format_spec));
     if (PyUnicode_Check(format_spec)) {
-    /* Convert format_spec to a str */
-    PyObject *result;
-    PyObject *str_spec = PyObject_Str(format_spec);
+        /* Convert format_spec to a str */
+        PyObject *result;
+        PyObject *str_spec = PyObject_Str(format_spec);
 
-    if (str_spec == NULL)
-        return NULL;
+        if (str_spec == NULL)
+            return NULL;
 
-    result = _PyComplex_FormatAdvanced(self,
-                                       PyBytes_AS_STRING(str_spec),
-                                       PyBytes_GET_SIZE(str_spec));
+        result = _PyComplex_FormatAdvanced(self,
+                                           PyBytes_AS_STRING(str_spec),
+                                           PyBytes_GET_SIZE(str_spec));
 
-    Py_DECREF(str_spec);
-    return result;
+        Py_DECREF(str_spec);
+        return result;
     }
     PyErr_SetString(PyExc_TypeError, "__format__ requires str or unicode");
     return NULL;
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -590,8 +590,9 @@
    To declare a class method, use this idiom:
 
      class C:
-     def f(cls, arg1, arg2, ...): ...
-     f = classmethod(f)
+         @classmethod
+         def f(cls, arg1, arg2, ...):
+             ...
 
    It can be called either on the class (e.g. C.f()) or on an instance
    (e.g. C().f()); the instance is ignored except for its class.
@@ -676,8 +677,9 @@
 To declare a class method, use this idiom:\n\
 \n\
   class C:\n\
-      def f(cls, arg1, arg2, ...): ...\n\
-      f = classmethod(f)\n\
+      @classmethod\n\
+      def f(cls, arg1, arg2, ...):\n\
+          ...\n\
 \n\
 It can be called either on the class (e.g. C.f()) or on an instance\n\
 (e.g. C().f()).  The instance is ignored except for its class.\n\
@@ -748,8 +750,9 @@
    To declare a static method, use this idiom:
 
      class C:
-     def f(arg1, arg2, ...): ...
-     f = staticmethod(f)
+         @staticmethod
+         def f(arg1, arg2, ...):
+             ....
 
    It can be called either on the class (e.g. C.f()) or on an instance
    (e.g. C().f()); the instance is ignored except for its class.
@@ -828,8 +831,9 @@
 To declare a static method, use this idiom:\n\
 \n\
      class C:\n\
-     def f(arg1, arg2, ...): ...\n\
-     f = staticmethod(f)\n\
+         @staticmethod\n\
+         def f(arg1, arg2, ...):\n\
+             ...\n\
 \n\
 It can be called either on the class (e.g. C.f()) or on an instance\n\
 (e.g. C().f()).  The instance is ignored except for its class.\n\
diff --git a/Objects/intobject.c b/Objects/intobject.c
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -1461,8 +1461,8 @@
     int ival;
 #if NSMALLNEGINTS + NSMALLPOSINTS > 0
     for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++) {
-          if (!free_list && (free_list = fill_free_list()) == NULL)
-                    return 0;
+        if (!free_list && (free_list = fill_free_list()) == NULL)
+            return 0;
         /* PyObject_New is inlined */
         v = free_list;
         free_list = (PyIntObject *)Py_TYPE(v);
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -30,11 +30,11 @@
     ---------------------------------------------------------------*/
     assert(step != 0);
     if (step > 0 && lo < hi)
-    return 1UL + (hi - 1UL - lo) / step;
+        return 1UL + (hi - 1UL - lo) / step;
     else if (step < 0 && lo > hi)
-    return 1UL + (lo - 1UL - hi) / (0UL - step);
+        return 1UL + (lo - 1UL - hi) / (0UL - step);
     else
-    return 0UL;
+        return 0UL;
 }
 
 /* Return a stop value suitable for reconstructing the xrange from
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -3287,8 +3287,8 @@
         }
         else
             return PyString_FromStringAndSize(
-            PyString_AS_STRING(self),
-            PyString_GET_SIZE(self)
+                PyString_AS_STRING(self),
+                PyString_GET_SIZE(self)
             );
     }
 
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -1617,16 +1617,16 @@
                     PropSheet_SetWizButtons(GetParent(hwnd),
                                             PSWIZB_BACK | PSWIZB_NEXT);
                     /* Get the python directory */
-            ivi = (InstalledVersionInfo *)
+                    ivi = (InstalledVersionInfo *)
                         SendDlgItemMessage(hwnd,
-                                                                IDC_VERSIONS_LIST,
-                                                                LB_GETITEMDATA,
-                                                                id,
-                                                                0);
-            hkey_root = ivi->hkey;
-                                strcpy(python_dir, ivi->prefix);
-                                SetDlgItemText(hwnd, IDC_PATH, python_dir);
-                                /* retrieve the python version and pythondll to use */
+                            IDC_VERSIONS_LIST,
+                            LB_GETITEMDATA,
+                            id,
+                            0);
+                    hkey_root = ivi->hkey;
+                    strcpy(python_dir, ivi->prefix);
+                    SetDlgItemText(hwnd, IDC_PATH, python_dir);
+                    /* retrieve the python version and pythondll to use */
                     result = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST,
                                                  LB_GETTEXTLEN, (WPARAM)id, 0);
                     pbuf = (char *)malloc(result + 1);
diff --git a/PC/os2vacpp/getpathp.c b/PC/os2vacpp/getpathp.c
--- a/PC/os2vacpp/getpathp.c
+++ b/PC/os2vacpp/getpathp.c
@@ -325,18 +325,18 @@
             pythonhome = NULL;
     }
     else {
-    char *delim;
+        char *delim;
 
         strcpy(prefix, pythonhome);
 
-    /* Extract Any Optional Trailing EXEC_PREFIX */
-    /* e.g. PYTHONHOME=<prefix>:<exec_prefix>   */
-    delim = strchr(prefix, DELIM);
-    if (delim) {
-        *delim = '\0';
-        strcpy(exec_prefix, delim+1);
-    } else
-        strcpy(exec_prefix, EXEC_PREFIX);
+        /* Extract Any Optional Trailing EXEC_PREFIX */
+        /* e.g. PYTHONHOME=<prefix>:<exec_prefix>   */
+        delim = strchr(prefix, DELIM);
+        if (delim) {
+            *delim = '\0';
+            strcpy(exec_prefix, delim+1);
+        } else
+            strcpy(exec_prefix, EXEC_PREFIX);
     }
 
     if (envpath && *envpath == '\0')
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2923,20 +2923,20 @@
 
                     if (need<2*outlen) {
                         need = 2*outlen;
-      }
-                                    if (_PyString_Resize(&result, need)) {
-                                            Py_DECREF(item);
-                                            return NULL;
-                                    }
-                                    outlen = need;
-                            }
-                            memcpy(
-                                    PyString_AS_STRING(result) + j,
-                                    PyString_AS_STRING(item),
-                                    reslen
-                            );
-                            j += reslen;
                     }
+                    if (_PyString_Resize(&result, need)) {
+                        Py_DECREF(item);
+                        return NULL;
+                    }
+                    outlen = need;
+                }
+                memcpy(
+                    PyString_AS_STRING(result) + j,
+                    PyString_AS_STRING(item),
+                    reslen
+                );
+                j += reslen;
+            }
         }
         Py_DECREF(item);
         if (ok < 0)
@@ -3031,29 +3031,27 @@
                 assert(outlen >= 0);
 
                 if (need > outlen) {
-                    /* overallocate,
-                       to avoid reallocations */
+                    /* overallocate, to avoid reallocations */
                     if (need < 2 * outlen) {
-        if (outlen > PY_SSIZE_T_MAX / 2) {
-          Py_DECREF(item);
-          return NULL;
-                                            } else {
-                                                    need = 2 * outlen;
-                                }
-      }
-
-                                    if (PyUnicode_Resize(
-                                            &result, need) < 0) {
-                                            Py_DECREF(item);
-                                            goto Fail_1;
-                                    }
-                                    outlen = need;
-                            }
-                            memcpy(PyUnicode_AS_UNICODE(result) + j,
-                                   PyUnicode_AS_UNICODE(item),
-                                   reslen*sizeof(Py_UNICODE));
-                            j += reslen;
+                        if (outlen > PY_SSIZE_T_MAX / 2) {
+                            Py_DECREF(item);
+                            return NULL;
+                        } else {
+                            need = 2 * outlen;
+                        }
                     }
+
+                    if (PyUnicode_Resize(&result, need) < 0) {
+                        Py_DECREF(item);
+                        goto Fail_1;
+                    }
+                    outlen = need;
+                }
+                memcpy(PyUnicode_AS_UNICODE(result) + j,
+                   PyUnicode_AS_UNICODE(item),
+                   reslen*sizeof(Py_UNICODE));
+                j += reslen;
+            }
         }
         Py_DECREF(item);
         if (ok < 0)
diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c
--- a/Python/mactoolboxglue.c
+++ b/Python/mactoolboxglue.c
@@ -356,11 +356,11 @@
 \
 PyObject *routinename(object cobj) { \
     if (!PyMacGluePtr_##routinename) { \
-       if (!PyImport_ImportModule(module)) return NULL; \
-       if (!PyMacGluePtr_##routinename) { \
-       PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
-       return NULL; \
-       } \
+        if (!PyImport_ImportModule(module)) return NULL; \
+        if (!PyMacGluePtr_##routinename) { \
+            PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
+            return NULL; \
+        } \
     } \
     return (*PyMacGluePtr_##routinename)(cobj); \
 }
@@ -370,11 +370,11 @@
 \
 int routinename(PyObject *pyobj, object *cobj) { \
     if (!PyMacGluePtr_##routinename) { \
-       if (!PyImport_ImportModule(module)) return 0; \
-       if (!PyMacGluePtr_##routinename) { \
-       PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
-       return 0; \
-       } \
+        if (!PyImport_ImportModule(module)) return 0; \
+        if (!PyMacGluePtr_##routinename) { \
+            PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
+            return 0; \
+        } \
     } \
     return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
 }
diff --git a/Python/thread_wince.h b/Python/thread_wince.h
--- a/Python/thread_wince.h
+++ b/Python/thread_wince.h
@@ -72,12 +72,12 @@
 
     dprintf(("PyThread_allocate_lock called\n"));
     if (!initialized)
-    PyThread_init_thread();
+        PyThread_init_thread();
 
     aLock = CreateEvent(NULL,           /* Security attributes      */
-            0,              /* Manual-Reset               */
+                        0,              /* Manual-Reset               */
                         1,              /* Is initially signalled  */
-            NULL);          /* Name of event            */
+                        NULL);          /* Name of event            */
 
     dprintf(("%ld: PyThread_allocate_lock() -> %p\n", PyThread_get_thread_ident(), aLock));
 
@@ -117,7 +117,7 @@
 #endif
 
     if (waitResult != WAIT_OBJECT_0) {
-                success = 0;    /* We failed */
+        success = 0;    /* We failed */
     }
 
     dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n", PyThread_get_thread_ident(),aLock, waitflag, success));
@@ -130,7 +130,7 @@
     dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
 
     if (!SetEvent(aLock))
-    dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n", PyThread_get_thread_ident(), aLock, GetLastError()));
+        dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n", PyThread_get_thread_ident(), aLock, GetLastError()));
 }
 
 
diff --git a/RISCOS/Modules/riscosmodule.c b/RISCOS/Modules/riscosmodule.c
--- a/RISCOS/Modules/riscosmodule.c
+++ b/RISCOS/Modules/riscosmodule.c
@@ -46,7 +46,7 @@
 {
     char *path1, *path2;
     if (!PyArg_ParseTuple(args, "ss:rename", &path1, &path2))
-    return NULL;
+        return NULL;
     if (rename(path1,path2)) return PyErr_SetFromErrno(PyExc_OSError);
     Py_INCREF(Py_None);
     return Py_None;

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


More information about the Python-checkins mailing list