Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0e431b93
Commit
0e431b93
authored
Mar 30, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indentation and add braces
parent
a4598a30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
Objects/stringobject.c
Objects/stringobject.c
+17
-16
No files found.
Objects/stringobject.c
View file @
0e431b93
...
@@ -3091,24 +3091,25 @@ string_expandtabs(PyStringObject *self, PyObject *args)
...
@@ -3091,24 +3091,25 @@ string_expandtabs(PyStringObject *self, PyObject *args)
i
=
0
;
/* chars up to and including most recent \n or \r */
i
=
0
;
/* chars up to and including most recent \n or \r */
j
=
0
;
/* chars since most recent \n or \r (use in tab calculations) */
j
=
0
;
/* chars since most recent \n or \r (use in tab calculations) */
e
=
PyString_AS_STRING
(
self
)
+
PyString_GET_SIZE
(
self
);
/* end of input */
e
=
PyString_AS_STRING
(
self
)
+
PyString_GET_SIZE
(
self
);
/* end of input */
for
(
p
=
PyString_AS_STRING
(
self
);
p
<
e
;
p
++
)
for
(
p
=
PyString_AS_STRING
(
self
);
p
<
e
;
p
++
)
{
if
(
*
p
==
'\t'
)
{
if
(
*
p
==
'\t'
)
{
if
(
tabsize
>
0
)
{
if
(
tabsize
>
0
)
{
incr
=
tabsize
-
(
j
%
tabsize
);
incr
=
tabsize
-
(
j
%
tabsize
);
if
(
j
>
PY_SSIZE_T_MAX
-
incr
)
if
(
j
>
PY_SSIZE_T_MAX
-
incr
)
goto
overflow1
;
goto
overflow1
;
j
+=
incr
;
j
+=
incr
;
}
}
}
}
else
{
else
{
if
(
j
>
PY_SSIZE_T_MAX
-
1
)
if
(
j
>
PY_SSIZE_T_MAX
-
1
)
goto
overflow1
;
j
++
;
if
(
*
p
==
'\n'
||
*
p
==
'\r'
)
{
if
(
i
>
PY_SSIZE_T_MAX
-
j
)
goto
overflow1
;
goto
overflow1
;
i
+=
j
;
j
++
;
j
=
0
;
if
(
*
p
==
'\n'
||
*
p
==
'\r'
)
{
if
(
i
>
PY_SSIZE_T_MAX
-
j
)
goto
overflow1
;
i
+=
j
;
j
=
0
;
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment