Commit 8312eccd authored by Benjamin Peterson's avatar Benjamin Peterson

add braces and fix indentation

parent 0e431b93
......@@ -3125,25 +3125,26 @@ string_expandtabs(PyStringObject *self, PyObject *args)
q = PyString_AS_STRING(u); /* next output char */
qe = PyString_AS_STRING(u) + PyString_GET_SIZE(u); /* end of output */
for (p = PyString_AS_STRING(self); p < e; p++)
if (*p == '\t') {
if (tabsize > 0) {
i = tabsize - (j % tabsize);
j += i;
while (i--) {
if (q >= qe)
goto overflow2;
*q++ = ' ';
for (p = PyString_AS_STRING(self); p < e; p++) {
if (*p == '\t') {
if (tabsize > 0) {
i = tabsize - (j % tabsize);
j += i;
while (i--) {
if (q >= qe)
goto overflow2;
*q++ = ' ';
}
}
}
}
else {
if (q >= qe)
goto overflow2;
*q++ = *p;
j++;
if (*p == '\n' || *p == '\r')
j = 0;
else {
if (q >= qe)
goto overflow2;
*q++ = *p;
j++;
if (*p == '\n' || *p == '\r')
j = 0;
}
}
return u;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment