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
71b6af91
Commit
71b6af91
authored
Aug 27, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If an integer constant can't be generated from an integer literal
because of overflow, generate a long instead.
parent
9aa70d93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Python/compile.c
Python/compile.c
+2
-5
No files found.
Python/compile.c
View file @
71b6af91
...
...
@@ -1084,11 +1084,8 @@ parsenumber(struct compiling *co, char *s)
else
x
=
PyOS_strtol
(
s
,
&
end
,
0
);
if
(
*
end
==
'\0'
)
{
if
(
errno
!=
0
)
{
com_error
(
co
,
PyExc_OverflowError
,
"integer literal too large"
);
return
NULL
;
}
if
(
errno
!=
0
)
return
PyLong_FromString
(
s
,
(
char
**
)
0
,
0
);
return
PyInt_FromLong
(
x
);
}
/* XXX Huge floats may silently fail */
...
...
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