diff --git a/Python/ceval.c b/Python/ceval.c
index fa9e7e0..4fcf25e 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -709,73 +709,73 @@
   /* This macro is used when several opcodes defer to the same implementation
    (e.g. SETUP_LOOP, SETUP_FINALLY) */
 #define TARGET_WITH_IMPL(op, impl) \
-		TARGET_##op: \
-		opcode = op; \
-		oparg = NEXTARG(); \
-		case op: \
-		goto impl; \
+        TARGET_##op: \
+        opcode = op; \
+        oparg = NEXTARG(); \
+        case op: \
+        goto impl; \
 
 #define TARGET_WITH_IMPL_NOARG(op, impl) \
-		TARGET_##op: \
-		opcode = op; \
-		case op: \
-		goto impl; \
+        TARGET_##op: \
+        opcode = op; \
+        case op: \
+        goto impl; \
 
 #define TARGET_NOARG(op) \
-		TARGET_##op: \
-		opcode = op; \
-		case op:\
+        TARGET_##op: \
+        opcode = op; \
+        case op:\
 
 #define TARGET(op) \
-		TARGET_##op: \
-		opcode = op; \
-		oparg = NEXTARG(); \
-		case op:\
+        TARGET_##op: \
+        opcode = op; \
+        oparg = NEXTARG(); \
+        case op:\
 
 
 #define DISPATCH() \
-		{ \
-	int _tick = _Py_Ticker - 1; \
-	_Py_Ticker = _tick; \
-	if (_tick >= 0) { \
-		FAST_DISPATCH(); \
-	} \
-	continue; \
-		}
+        { \
+    int _tick = _Py_Ticker - 1; \
+    _Py_Ticker = _tick; \
+    if (_tick >= 0) { \
+        FAST_DISPATCH(); \
+    } \
+    continue; \
+        }
 
 #ifdef LLTRACE
 #define FAST_DISPATCH() \
-		{ \
-	if (!lltrace && !_Py_TracingPossible) { \
-		f->f_lasti = INSTR_OFFSET(); \
-		goto *opcode_targets[*next_instr++]; \
-	} \
-	goto fast_next_opcode; \
-		}
+        { \
+    if (!lltrace && !_Py_TracingPossible) { \
+        f->f_lasti = INSTR_OFFSET(); \
+        goto *opcode_targets[*next_instr++]; \
+    } \
+    goto fast_next_opcode; \
+        }
 #else
 #define FAST_DISPATCH() { \
-		if (!_Py_TracingPossible) { \
-			f->f_lasti = INSTR_OFFSET(); \
-			goto *opcode_targets[*next_instr++]; \
-		} \
-		goto fast_next_opcode;\
+        if (!_Py_TracingPossible) { \
+            f->f_lasti = INSTR_OFFSET(); \
+            goto *opcode_targets[*next_instr++]; \
+        } \
+        goto fast_next_opcode;\
 }
 #endif
 
 #else
 #define TARGET(op) \
-		case op:
+        case op:
 #define TARGET_WITH_IMPL(op, impl) \
-		/* silence compiler warnings about `impl` unused */ \
-		if (0) goto impl; \
-		case op:\
+        /* silence compiler warnings about `impl` unused */ \
+        if (0) goto impl; \
+        case op:\
 
 #define TARGET_NOARG(op) \
-		case op:\
+        case op:\
 
 #define TARGET_WITH_IMPL_NOARG(op, impl) \
-		if (0) goto impl; \
-		case op:\
+        if (0) goto impl; \
+        case op:\
 
 #define DISPATCH() continue
 #define FAST_DISPATCH() goto fast_next_opcode
@@ -1206,9 +1206,9 @@
         /* case STOP_CODE: this is an error! */
 
         TARGET_NOARG(NOP)
-    	{
-        	FAST_DISPATCH();
-    	}
+        {
+            FAST_DISPATCH();
+        }
 
         TARGET(LOAD_FAST)
         {
@@ -1216,7 +1216,7 @@
             if (x != NULL) {
                 Py_INCREF(x);
                 PUSH(x);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             format_exc_check_arg(PyExc_UnboundLocalError,
                 UNBOUNDLOCAL_ERROR_MSG,
@@ -1229,7 +1229,7 @@
             x = GETITEM(consts, oparg);
             Py_INCREF(x);
             PUSH(x);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         PREDICTED_WITH_ARG(STORE_FAST);
@@ -1237,14 +1237,14 @@
         {
             v = POP();
             SETLOCAL(oparg, v);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         TARGET_NOARG(POP_TOP)
         {
             v = POP();
             Py_DECREF(v);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         TARGET_NOARG(ROT_TWO)
@@ -1253,7 +1253,7 @@
             w = SECOND();
             SET_TOP(w);
             SET_SECOND(v);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         TARGET_NOARG(ROT_THREE)
@@ -1264,11 +1264,11 @@
             SET_TOP(w);
             SET_SECOND(x);
             SET_THIRD(v);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         TARGET_NOARG(ROT_FOUR)
-     	{
+         {
             u = TOP();
             v = SECOND();
             w = THIRD();
@@ -1278,7 +1278,7 @@
             SET_THIRD(x);
             SET_FOURTH(u);
             FAST_DISPATCH();
-		}
+        }
 
        
         TARGET_NOARG(DUP_TOP)
@@ -1286,7 +1286,7 @@
             v = TOP();
             Py_INCREF(v);
             PUSH(v);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
 
@@ -1300,7 +1300,7 @@
                 STACKADJ(2);
                 SET_TOP(x);
                 SET_SECOND(w);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             } else if (oparg == 3) {
                 x = TOP();
                 Py_INCREF(x);
@@ -1312,7 +1312,7 @@
                 SET_TOP(x);
                 SET_SECOND(w);
                 SET_THIRD(v);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             Py_FatalError("invalid argument to DUP_TOPX"
                           " (bytecode corruption?)");
@@ -1326,7 +1326,7 @@
             x = PyNumber_Positive(v);
             Py_DECREF(v);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1336,7 +1336,7 @@
             x = PyNumber_Negative(v);
             Py_DECREF(v);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1348,13 +1348,13 @@
             if (err == 0) {
                 Py_INCREF(Py_True);
                 SET_TOP(Py_True);
-        		DISPATCH();
+                DISPATCH();
             }
             else if (err > 0) {
                 Py_INCREF(Py_False);
                 SET_TOP(Py_False);
                 err = 0;
-        		DISPATCH();
+                DISPATCH();
             }
             STACKADJ(-1);
             break;
@@ -1366,7 +1366,7 @@
             x = PyObject_Repr(v);
             Py_DECREF(v);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1376,7 +1376,7 @@
             x = PyNumber_Invert(v);
             Py_DECREF(v);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1388,7 +1388,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1400,7 +1400,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if(x!=NULL) DISPATCH();
+            if(x!=NULL) DISPATCH();
             break;
         }
 
@@ -1413,7 +1413,7 @@
                 Py_DECREF(v);
                 Py_DECREF(w);
                 SET_TOP(x);
-        		if (x != NULL) DISPATCH();
+                if (x != NULL) DISPATCH();
                 break;
             }
         }
@@ -1426,7 +1426,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1438,7 +1438,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1453,7 +1453,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1487,7 +1487,7 @@
           skip_decref_vx:
             Py_DECREF(w);
             SET_TOP(x);
-			if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1514,7 +1514,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1540,7 +1540,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1552,7 +1552,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1564,7 +1564,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1576,7 +1576,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1588,7 +1588,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1600,7 +1600,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1612,7 +1612,7 @@
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -1625,7 +1625,7 @@
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -1638,7 +1638,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1650,7 +1650,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1663,7 +1663,7 @@
                 Py_DECREF(v);
                 Py_DECREF(w);
                 SET_TOP(x);
-        		if (x != NULL) DISPATCH();
+                if (x != NULL) DISPATCH();
                 break;
             }
         }
@@ -1677,7 +1677,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1689,7 +1689,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1701,7 +1701,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1733,7 +1733,7 @@
           skip_decref_v:
             Py_DECREF(w);
             SET_TOP(x);
-			if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1758,7 +1758,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1770,7 +1770,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1782,7 +1782,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1794,7 +1794,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1806,7 +1806,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1818,7 +1818,7 @@
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -1826,10 +1826,10 @@
      
         TARGET_WITH_IMPL_NOARG(SLICE, _slice)
         TARGET_WITH_IMPL_NOARG(SLICE_1, _slice)
-		TARGET_WITH_IMPL_NOARG(SLICE_2, _slice)
-		TARGET_WITH_IMPL_NOARG(SLICE_3, _slice)
-		_slice:
-		{
+        TARGET_WITH_IMPL_NOARG(SLICE_2, _slice)
+        TARGET_WITH_IMPL_NOARG(SLICE_3, _slice)
+        _slice:
+        {
             if ((opcode-SLICE) & 2)
                 w = POP();
             else
@@ -1844,17 +1844,17 @@
             Py_XDECREF(v);
             Py_XDECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
-		}
+        }
 
      
         TARGET_WITH_IMPL_NOARG(STORE_SLICE, _store_slice)
         TARGET_WITH_IMPL_NOARG(STORE_SLICE_1, _store_slice)
-		TARGET_WITH_IMPL_NOARG(STORE_SLICE_2, _store_slice)
-		TARGET_WITH_IMPL_NOARG(STORE_SLICE_3, _store_slice)
-		_store_slice:
-		{
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE_2, _store_slice)
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE_3, _store_slice)
+        _store_slice:
+        {
             if ((opcode-STORE_SLICE) & 2)
                 w = POP();
             else
@@ -1870,17 +1870,17 @@
             Py_DECREF(u);
             Py_XDECREF(v);
             Py_XDECREF(w);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
-		}
+        }
 
 
         TARGET_WITH_IMPL_NOARG(DELETE_SLICE, _delete_slice)
         TARGET_WITH_IMPL_NOARG(DELETE_SLICE_1, _delete_slice)
-		TARGET_WITH_IMPL_NOARG(DELETE_SLICE_2, _delete_slice)
-		TARGET_WITH_IMPL_NOARG(DELETE_SLICE_3, _delete_slice)
-		_delete_slice:
-		{
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE_2, _delete_slice)
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE_3, _delete_slice)
+        _delete_slice:
+        {
             if ((opcode-DELETE_SLICE) & 2)
                 w = POP();
             else
@@ -1895,9 +1895,9 @@
             Py_DECREF(u);
             Py_XDECREF(v);
             Py_XDECREF(w);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
-		}
+        }
 
         TARGET_NOARG(STORE_SUBSCR)
         {
@@ -1910,7 +1910,7 @@
             Py_DECREF(u);
             Py_DECREF(v);
             Py_DECREF(w);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -1923,7 +1923,7 @@
             err = PyObject_DelItem(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2006,7 +2006,7 @@
             Py_DECREF(v);
             Py_XDECREF(stream);
             stream = NULL;
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2018,8 +2018,8 @@
 
         TARGET_NOARG(PRINT_NEWLINE)
         {
-        	if (stream == NULL || stream == Py_None)
-        	{
+            if (stream == NULL || stream == Py_None)
+            {
                 w = PySys_GetObject("stdout");
                 if (w == NULL) {
                     PyErr_SetString(PyExc_RuntimeError,
@@ -2046,7 +2046,7 @@
 #endif
 
         TARGET(RAISE_VARARGS)
-    		{
+            {
             u = v = w = NULL;
             switch (oparg) {
             case 3:
@@ -2067,15 +2067,15 @@
                 break;
             }
             break;
-    		}
+            }
 
         TARGET_NOARG(LOAD_LOCALS)
         {
-        	if ((x = f->f_locals) != NULL)
-        	{
+            if ((x = f->f_locals) != NULL)
+            {
                 Py_INCREF(x);
                 PUSH(x);
-        		DISPATCH();
+                DISPATCH();
             }
             PyErr_SetString(PyExc_SystemError, "no locals");
             break;
@@ -2120,7 +2120,7 @@
                     Py_DECREF(v);
                 }
             }
-        	DISPATCH();
+            DISPATCH();
         }
 
         PREDICTED(END_FINALLY);
@@ -2175,7 +2175,7 @@
                 else
                     err = PyObject_SetItem(x, w, v);
                 Py_DECREF(v);
-        		if (err == 0) DISPATCH();
+                if (err == 0) DISPATCH();
                 break;
             }
             t = PyObject_Repr(w);
@@ -2222,7 +2222,7 @@
                     PUSH(w);
                 }
                 Py_DECREF(v);
-        		DISPATCH();
+                DISPATCH();
             } else if (PyList_CheckExact(v) &&
                        PyList_GET_SIZE(v) == oparg) {
                 PyObject **items = \
@@ -2253,7 +2253,7 @@
             err = PyObject_SetAttr(v, w, u); /* v.w = u */
             Py_DECREF(v);
             Py_DECREF(u);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2274,7 +2274,7 @@
             v = POP();
             err = PyDict_SetItem(f->f_globals, w, v);
             Py_DECREF(v);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2328,7 +2328,7 @@
                 Py_INCREF(x);
             }
             PUSH(x);
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(LOAD_GLOBAL)
@@ -2352,7 +2352,7 @@
                     if (x != NULL) {
                         Py_INCREF(x);
                         PUSH(x);
-        				DISPATCH();
+                        DISPATCH();
                     }
                     d = (PyDictObject *)(f->f_builtins);
                     e = d->ma_lookup(d, w, hash);
@@ -2364,7 +2364,7 @@
                     if (x != NULL) {
                         Py_INCREF(x);
                         PUSH(x);
-        				DISPATCH();
+                        DISPATCH();
                     }
                     goto load_global_error;
                 }
@@ -2383,7 +2383,7 @@
             }
             Py_INCREF(x);
             PUSH(x);
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(DELETE_FAST)
@@ -2391,7 +2391,7 @@
             x = GETLOCAL(oparg);
             if (x != NULL) {
                 SETLOCAL(oparg, NULL);
-        		DISPATCH();
+                DISPATCH();
             }
             format_exc_check_arg(
                 PyExc_UnboundLocalError,
@@ -2406,7 +2406,7 @@
             x = freevars[oparg];
             Py_INCREF(x);
             PUSH(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -2416,7 +2416,7 @@
             w = PyCell_Get(x);
             if (w != NULL) {
                 PUSH(w);
-        		DISPATCH();
+                DISPATCH();
             }
             err = -1;
             /* Don't stomp existing exception */
@@ -2444,7 +2444,7 @@
             x = freevars[oparg];
             PyCell_Set(x, w);
             Py_DECREF(w);
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(BUILD_TUPLE)
@@ -2456,7 +2456,7 @@
                     PyTuple_SET_ITEM(x, oparg, w);
                 }
                 PUSH(x);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -2470,7 +2470,7 @@
                     PyList_SET_ITEM(x, oparg, w);
                 }
                 PUSH(x);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -2490,7 +2490,7 @@
                     break;
                 }
                 PUSH(x);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -2499,7 +2499,7 @@
         {
             x = _PyDict_NewPresized((Py_ssize_t)oparg);
             PUSH(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -2513,7 +2513,7 @@
             err = PyDict_SetItem(v, w, u);  /* v[w] = u */
             Py_DECREF(u);
             Py_DECREF(w);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2529,7 +2529,7 @@
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-        		DISPATCH();
+                DISPATCH();
             }
             break;
         }
@@ -2541,7 +2541,7 @@
             x = PyObject_GetAttr(v, w);
             Py_DECREF(v);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -2579,7 +2579,7 @@
             if (x == NULL) break;
             PREDICT(POP_JUMP_IF_FALSE);
             PREDICT(POP_JUMP_IF_TRUE);
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(IMPORT_NAME)
@@ -2624,7 +2624,7 @@
             READ_TIMESTAMP(intr1);
             Py_DECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -2642,7 +2642,7 @@
             READ_TIMESTAMP(intr1);
             PyFrame_LocalsToFast(f, 0);
             Py_DECREF(v);
-        	if (err == 0) DISPATCH();
+            if (err == 0) DISPATCH();
             break;
         }
 
@@ -2654,14 +2654,14 @@
             x = import_from(v, w);
             READ_TIMESTAMP(intr1);
             PUSH(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
         TARGET(JUMP_FORWARD)
         {
             JUMPBY(oparg);
-        	FAST_DISPATCH();
+            FAST_DISPATCH();
         }
 
         PREDICTED_WITH_ARG(POP_JUMP_IF_FALSE);
@@ -2670,12 +2670,12 @@
             w = POP();
             if (w == Py_True) {
                 Py_DECREF(w);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             if (w == Py_False) {
                 Py_DECREF(w);
                 JUMPTO(oparg);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             Py_DECREF(w);
@@ -2685,7 +2685,7 @@
                 JUMPTO(oparg);
             else
                 break;
-        	DISPATCH();
+            DISPATCH();
         }
 
         PREDICTED_WITH_ARG(POP_JUMP_IF_TRUE);
@@ -2694,12 +2694,12 @@
             w = POP();
             if (w == Py_False) {
                 Py_DECREF(w);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             if (w == Py_True) {
                 Py_DECREF(w);
                 JUMPTO(oparg);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             Py_DECREF(w);
@@ -2711,7 +2711,7 @@
                 ;
             else
                 break;
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(JUMP_IF_FALSE_OR_POP)
@@ -2720,11 +2720,11 @@
             if (w == Py_True) {
                 STACKADJ(-1);
                 Py_DECREF(w);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             if (w == Py_False) {
                 JUMPTO(oparg);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             if (err > 0) {
@@ -2736,7 +2736,7 @@
                 JUMPTO(oparg);
             else
                 break;
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET(JUMP_IF_TRUE_OR_POP)
@@ -2745,11 +2745,11 @@
             if (w == Py_False) {
                 STACKADJ(-1);
                 Py_DECREF(w);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             if (w == Py_True) {
                 JUMPTO(oparg);
-        		FAST_DISPATCH();
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             if (err > 0) {
@@ -2762,7 +2762,7 @@
             }
             else
                 break;
-        	DISPATCH();
+            DISPATCH();
         }
 
         PREDICTED_WITH_ARG(JUMP_ABSOLUTE);
@@ -2779,7 +2779,7 @@
             */
             goto fast_next_opcode;
 #else
-        	DISPATCH();
+            DISPATCH();
 #endif
         }
 
@@ -2792,7 +2792,7 @@
             if (x != NULL) {
                 SET_TOP(x);
                 PREDICT(FOR_ITER);
-        		DISPATCH();
+                DISPATCH();
             }
             STACKADJ(-1);
             break;
@@ -2808,7 +2808,7 @@
                 PUSH(x);
                 PREDICT(STORE_FAST);
                 PREDICT(UNPACK_SEQUENCE);
-        		DISPATCH();
+                DISPATCH();
             }
             if (PyErr_Occurred()) {
                 if (!PyErr_ExceptionMatches(
@@ -2820,7 +2820,7 @@
             x = v = POP();
             Py_DECREF(v);
             JUMPBY(oparg);
-        	DISPATCH();
+            DISPATCH();
         }
 
         TARGET_NOARG(BREAK_LOOP)
@@ -2842,9 +2842,9 @@
 
         TARGET_WITH_IMPL(SETUP_LOOP, _setup_finally)
         TARGET_WITH_IMPL(SETUP_EXCEPT, _setup_finally)
-		TARGET(SETUP_FINALLY)
-		_setup_finally:
-		{
+        TARGET(SETUP_FINALLY)
+        _setup_finally:
+        {
             /* NOTE: If you add any new block-setup opcodes that
                are not try/except/finally handlers, you may need
                to update the PyGen_NeedsFinalizing() function.
@@ -2852,8 +2852,8 @@
 
             PyFrame_BlockSetup(f, opcode, INSTR_OFFSET() + oparg,
                                STACK_LEVEL());
-        	DISPATCH();
-		}
+            DISPATCH();
+        }
 
 
 
@@ -2884,8 +2884,8 @@
                                STACK_LEVEL());
 
             PUSH(x);
-        		DISPATCH();
-        	}
+                DISPATCH();
+            }
         }
 
         TARGET_NOARG(WITH_CLEANUP)
@@ -2988,14 +2988,14 @@
 #endif
             stack_pointer = sp;
             PUSH(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
         TARGET_WITH_IMPL(CALL_FUNCTION_VAR, _call_function_var_kw)
         TARGET_WITH_IMPL(CALL_FUNCTION_KW, _call_function_var_kw)
-		TARGET(CALL_FUNCTION_VAR_KW)
-		_call_function_var_kw:
+        TARGET(CALL_FUNCTION_VAR_KW)
+        _call_function_var_kw:
         {
             int na = oparg & 0xff;
             int nk = (oparg>>8) & 0xff;
@@ -3033,7 +3033,7 @@
                 Py_DECREF(w);
             }
             PUSH(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
@@ -3110,7 +3110,7 @@
             Py_DECREF(v);
             Py_XDECREF(w);
             SET_TOP(x);
-        	if (x != NULL) DISPATCH();
+            if (x != NULL) DISPATCH();
             break;
         }
 
