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
0037352d
Commit
0037352d
authored
Sep 13, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #27981: Merge from 3.5
parents
b5d67b72
720acbf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Parser/tokenizer.c
Parser/tokenizer.c
+5
-2
No files found.
Parser/tokenizer.c
View file @
0037352d
...
...
@@ -497,7 +497,7 @@ error:
static
int
fp_setreadl
(
struct
tok_state
*
tok
,
const
char
*
enc
)
{
PyObject
*
readline
=
NULL
,
*
stream
=
NULL
,
*
io
=
NULL
;
PyObject
*
readline
=
NULL
,
*
stream
=
NULL
,
*
io
=
NULL
,
*
bufobj
;
_Py_IDENTIFIER
(
open
);
_Py_IDENTIFIER
(
readline
);
int
fd
;
...
...
@@ -528,9 +528,12 @@ fp_setreadl(struct tok_state *tok, const char* enc)
readline
=
_PyObject_GetAttrId
(
stream
,
&
PyId_readline
);
Py_XSETREF
(
tok
->
decoding_readline
,
readline
);
if
(
pos
>
0
)
{
if
(
PyObject_CallObject
(
readline
,
NULL
)
==
NULL
)
{
bufobj
=
PyObject_CallObject
(
readline
,
NULL
);
if
(
bufobj
==
NULL
)
{
readline
=
NULL
;
goto
cleanup
;
}
else
{
Py_DECREF
(
bufobj
);
}
}
...
...
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