diff options
Diffstat (limited to 'Objects/stringlib/transmogrify.h')
-rw-r--r-- | Objects/stringlib/transmogrify.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/stringlib/transmogrify.h b/Objects/stringlib/transmogrify.h index be595a62ef..cbd7144b0e 100644 --- a/Objects/stringlib/transmogrify.h +++ b/Objects/stringlib/transmogrify.h @@ -18,10 +18,10 @@ stringlib_expandtabs(PyObject *self, PyObject *args) Py_ssize_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); @@ -46,15 +46,15 @@ stringlib_expandtabs(PyObject *self, PyObject *args) } } } - + if (i > PY_SSIZE_T_MAX - j) goto overflow; - + /* Second pass: create output string and fill it */ u = STRINGLIB_NEW(NULL, i + j); if (!u) return NULL; - + j = 0; q = STRINGLIB_STR(u); |