Commit da79e632 authored by Victor Stinner's avatar Victor Stinner

Micro-optimize unicode_expandtabs(): use FILL() macro to write N spaces

parent 15e9ed29
......@@ -9975,7 +9975,6 @@ pad(PyObject *self,
assert(_PyUnicode_CheckConsistency(u, 1));
return u;
}
#undef FILL
PyObject *
PyUnicode_Splitlines(PyObject *string, int keepends)
......@@ -11141,10 +11140,8 @@ unicode_expandtabs(PyObject *self, PyObject *args)
if (tabsize > 0) {
incr = tabsize - (line_pos % tabsize);
line_pos += incr;
while (incr--) {
PyUnicode_WRITE(kind, dest_data, j, ' ');
j++;
}
FILL(kind, dest_data, ' ', j, incr);
j += incr;
}
}
else {
......
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