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
b3058f15
Commit
b3058f15
authored
Oct 20, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment out 'abort()' call.
Changed comparison operators.
parent
8f4e35d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Python/compile.c
Python/compile.c
+7
-6
No files found.
Python/compile.c
View file @
b3058f15
...
...
@@ -245,8 +245,10 @@ com_addbyte(c, byte)
{
int
len
;
if
(
byte
<
0
||
byte
>
255
)
{
/*
fprintf(stderr, "XXX compiling bad byte: %d\n", byte);
abort();
*/
err_setstr
(
SystemError
,
"com_addbyte: byte out of range"
);
c
->
c_errors
++
;
}
...
...
@@ -758,14 +760,18 @@ cmp_type(n)
node
*
n
;
{
REQ
(
n
,
comp_op
);
/* comp_op: '<' | '>' | '=' | '>
' '=' | '<' '=' | '<' '>
'
/* comp_op: '<' | '>' | '=' | '>
=' | '<=' | '<>' | '!=' | '==
'
| 'in' | 'not' 'in' | 'is' | 'is' not' */
if
(
NCH
(
n
)
==
1
)
{
n
=
CHILD
(
n
,
0
);
switch
(
TYPE
(
n
))
{
case
LESS
:
return
LT
;
case
GREATER
:
return
GT
;
case
EQEQUAL
:
/* == */
case
EQUAL
:
return
EQ
;
case
LESSEQUAL
:
return
LE
;
case
GREATEREQUAL
:
return
GE
;
case
NOTEQUAL
:
return
NE
;
/* <> or != */
case
NAME
:
if
(
strcmp
(
STR
(
n
),
"in"
)
==
0
)
return
IN
;
if
(
strcmp
(
STR
(
n
),
"is"
)
==
0
)
return
IS
;
}
...
...
@@ -773,11 +779,6 @@ cmp_type(n)
else
if
(
NCH
(
n
)
==
2
)
{
int
t2
=
TYPE
(
CHILD
(
n
,
1
));
switch
(
TYPE
(
CHILD
(
n
,
0
)))
{
case
LESS
:
if
(
t2
==
EQUAL
)
return
LE
;
if
(
t2
==
GREATER
)
return
NE
;
break
;
case
GREATER
:
if
(
t2
==
EQUAL
)
return
GE
;
break
;
case
NAME
:
if
(
strcmp
(
STR
(
CHILD
(
n
,
1
)),
"in"
)
==
0
)
return
NOT_IN
;
if
(
strcmp
(
STR
(
CHILD
(
n
,
0
)),
"is"
)
==
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