summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/transmogrify.h
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-04-21 01:07:51 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-04-21 01:07:51 (GMT)
commit6b02772c13000af7065cf774a04a0e6c76cb1238 (patch)
tree522ae94426f4900bc57abdf0f0036403ff4bb1a9 /Objects/stringlib/transmogrify.h
parent65f7a9e3c097169b7ba8ded9a957b65a0fd54604 (diff)
downloadcpython-6b02772c13000af7065cf774a04a0e6c76cb1238.zip
cpython-6b02772c13000af7065cf774a04a0e6c76cb1238.tar.gz
cpython-6b02772c13000af7065cf774a04a0e6c76cb1238.tar.bz2
Remove trailing whitespace.
Diffstat (limited to 'Objects/stringlib/transmogrify.h')
-rw-r--r--Objects/stringlib/transmogrify.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/stringlib/transmogrify.h b/Objects/stringlib/transmogrify.h
index 1e132e5..90fa129 100644
--- a/Objects/stringlib/transmogrify.h
+++ b/Objects/stringlib/transmogrify.h
@@ -18,10 +18,10 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
size_t i, j;
PyObject *u;
int tabsize = 8;
-
+
if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
return NULL;
-
+
/* First pass: determine size of output string */
i = j = 0;
e = STRINGLIB_STR(self) + STRINGLIB_LEN(self);
@@ -48,20 +48,20 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
}
}
}
-
+
if ((i + j) > PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError, "result is too long");
return NULL;
}
-
+
/* Second pass: create output string and fill it */
u = STRINGLIB_NEW(NULL, i + j);
if (!u)
return NULL;
-
+
j = 0;
q = STRINGLIB_STR(u);
-
+
for (p = STRINGLIB_STR(self); p < e; p++)
if (*p == '\t') {
if (tabsize > 0) {
@@ -77,7 +77,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args)
if (*p == '\n' || *p == '\r')
j = 0;
}
-
+
return u;
}