]> granicus.if.org Git - python/commitdiff
fix misleading indentation (closes #28139)
authorBenjamin Peterson <benjamin@python.org>
Wed, 14 Sep 2016 04:48:57 +0000 (21:48 -0700)
committerBenjamin Peterson <benjamin@python.org>
Wed, 14 Sep 2016 04:48:57 +0000 (21:48 -0700)
Modules/_localemodule.c
Modules/cjkcodecs/multibytecodec.c
Python/ast.c

index fe7b0989b474d51a340d5aeeb120e764a0102da4..e497a8faeef95646935344bd0a1ed993c7050807 100644 (file)
@@ -172,23 +172,23 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
 #endif
 
     if (locale) {
-    /* set locale */
-    result = setlocale(category, locale);
-    if (!result) {
-        /* operation failed, no setting was changed */
-        PyErr_SetString(Error, "unsupported locale setting");
-        return NULL;
-    }
-    result_object = PyString_FromString(result);
-    if (!result_object)
-        return NULL;
-    /* record changes to LC_CTYPE */
-    if (category == LC_CTYPE || category == LC_ALL)
-        fixup_ulcase();
+        /* set locale */
+        result = setlocale(category, locale);
+        if (!result) {
+            /* operation failed, no setting was changed */
+            PyErr_SetString(Error, "unsupported locale setting");
+            return NULL;
+        }
+        result_object = PyString_FromString(result);
+        if (!result_object)
+            return NULL;
+        /* record changes to LC_CTYPE */
+        if (category == LC_CTYPE || category == LC_ALL)
+            fixup_ulcase();
         /* things that got wrong up to here are ignored */
         PyErr_Clear();
     } else {
-    /* get locale */
+        /* get locale */
         result = setlocale(category, NULL);
         if (!result) {
             PyErr_SetString(Error, "locale query failed");
@@ -297,9 +297,9 @@ PyLocale_strcoll(PyObject* self, PyObject* args)
     }
     /* Convert the non-unicode argument to unicode. */
     if (!PyUnicode_Check(os1)) {
-    os1 = PyUnicode_FromObject(os1);
-    if (!os1)
-        return NULL;
+        os1 = PyUnicode_FromObject(os1);
+        if (!os1)
+            return NULL;
         rel1 = 1;
     }
     if (!PyUnicode_Check(os2)) {
index 376f8ee1e33ef2a68ae75189dce0171f280c741c..2f2eb5276744ed4d15357a1b4e8fd4da74724324 100644 (file)
@@ -531,7 +531,7 @@ multibytecodec_encode(MultibyteCodec *codec,
         if (_PyString_Resize(&buf.outobj, finalsize) == -1)
             goto errorexit;
 
-       *data = buf.inbuf;
+    *data = buf.inbuf;
     Py_XDECREF(buf.excobj);
     return buf.outobj;
 
index 2b7aed808bf32ebd5a11eb66ff60ee0ad287e024..318c0bb27d35c3fbbe70569934e9f41651b5927f 100644 (file)
@@ -2284,7 +2284,7 @@ ast_for_print_stmt(struct compiling *c, const node *n)
         dest = ast_for_expr(c, CHILD(n, 2));
         if (!dest)
             return NULL;
-            start = 4;
+        start = 4;
     }
     values_count = (NCH(n) + 1 - start) / 2;
     if (values_count) {