Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
1a4c2d2c
Commit
1a4c2d2c
authored
Dec 20, 2014
by
Bob Fang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #171: a first attempt
fix bug #171: a first attempt
parent
bc96d294
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/runtime/list.cpp
src/runtime/list.cpp
+4
-2
No files found.
src/runtime/list.cpp
View file @
1a4c2d2c
...
...
@@ -396,7 +396,8 @@ Box* listContains(BoxedList* self, Box* elt) {
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
Box
*
e
=
self
->
elts
->
elts
[
i
];
Box
*
cmp
=
compareInternal
(
e
,
elt
,
AST_TYPE
::
Eq
,
NULL
);
bool
b
=
nonzero
(
cmp
);
bool
identity_eq
=
e
==
elt
;
bool
b
=
nonzero
(
cmp
)
||
identity_eq
;
if
(
b
)
return
True
;
}
...
...
@@ -518,7 +519,8 @@ Box* _listCmp(BoxedList* lhs, BoxedList* rhs, AST_TYPE::AST_TYPE op_type) {
int
n
=
std
::
min
(
lsz
,
rsz
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
Box
*
is_eq
=
compareInternal
(
lhs
->
elts
->
elts
[
i
],
rhs
->
elts
->
elts
[
i
],
AST_TYPE
::
Eq
,
NULL
);
bool
bis_eq
=
nonzero
(
is_eq
);
bool
identity_eq
=
lhs
->
elts
->
elts
[
i
]
==
rhs
->
elts
->
elts
[
i
];
bool
bis_eq
=
nonzero
(
is_eq
)
||
identity_eq
;
if
(
bis_eq
)
continue
;
...
...
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