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
899945ec
Commit
899945ec
authored
Dec 31, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes.
parent
4cb0aac6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
Python/compile.c
Python/compile.c
+10
-5
No files found.
Python/compile.c
View file @
899945ec
...
@@ -329,7 +329,7 @@ com_backpatch(c, anchor)
...
@@ -329,7 +329,7 @@ com_backpatch(c, anchor)
}
}
}
}
/* Handle
constant
s and names uniformly */
/* Handle
literal
s and names uniformly */
static
int
static
int
com_add
(
c
,
list
,
v
)
com_add
(
c
,
list
,
v
)
...
@@ -423,7 +423,7 @@ parsenumber(s)
...
@@ -423,7 +423,7 @@ parsenumber(s)
if
(
*
end
==
'\0'
)
{
if
(
*
end
==
'\0'
)
{
if
(
errno
!=
0
)
{
if
(
errno
!=
0
)
{
err_setstr
(
OverflowError
,
err_setstr
(
OverflowError
,
"integer
constant
too large"
);
"integer
literal
too large"
);
return
NULL
;
return
NULL
;
}
}
return
newintobject
(
x
);
return
newintobject
(
x
);
...
@@ -431,10 +431,15 @@ parsenumber(s)
...
@@ -431,10 +431,15 @@ parsenumber(s)
errno
=
0
;
errno
=
0
;
xx
=
strtod
(
s
,
&
end
);
xx
=
strtod
(
s
,
&
end
);
if
(
*
end
==
'\0'
)
{
if
(
*
end
==
'\0'
)
{
#ifndef BROKEN_STRTOD
/* Some strtod() versions (e.g., in older SunOS systems)
set errno incorrectly; better to ignore overflows
than not to be able to use float literals at all! */
if
(
errno
!=
0
)
{
if
(
errno
!=
0
)
{
err_setstr
(
OverflowError
,
"float
constant
too large"
);
err_setstr
(
OverflowError
,
"float
literal
too large"
);
return
NULL
;
return
NULL
;
}
}
#endif
return
newfloatobject
(
xx
);
return
newfloatobject
(
xx
);
}
}
err_setstr
(
SystemError
,
"bad number syntax?!?!"
);
err_setstr
(
SystemError
,
"bad number syntax?!?!"
);
...
@@ -1258,7 +1263,7 @@ com_assign(c, n, assigning)
...
@@ -1258,7 +1263,7 @@ com_assign(c, n, assigning)
return
;
return
;
default:
default:
err_setstr
(
TypeError
,
err_setstr
(
TypeError
,
"can't assign to
constant
"
);
"can't assign to
literal
"
);
c
->
c_errors
++
;
c
->
c_errors
++
;
return
;
return
;
}
}
...
@@ -1938,7 +1943,7 @@ com_fplist(c, n)
...
@@ -1938,7 +1943,7 @@ com_fplist(c, n)
struct
compiling
*
c
;
struct
compiling
*
c
;
node
*
n
;
node
*
n
;
{
{
REQ
(
n
,
fplist
);
/* fplist: fpdef (',' fpdef)* */
REQ
(
n
,
fplist
);
/* fplist: fpdef (',' fpdef)*
[',']
*/
if
(
NCH
(
n
)
==
1
)
{
if
(
NCH
(
n
)
==
1
)
{
com_fpdef
(
c
,
CHILD
(
n
,
0
));
com_fpdef
(
c
,
CHILD
(
n
,
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