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
7e42a198
Commit
7e42a198
authored
Mar 29, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple bool issues
parent
8ab8475a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
4 deletions
+2
-4
src/runtime/bool.cpp
src/runtime/bool.cpp
+1
-1
src/runtime/types.cpp
src/runtime/types.cpp
+1
-1
test/tests/bool_functions.py
test/tests/bool_functions.py
+0
-1
test/tests/bool_passing.py
test/tests/bool_passing.py
+0
-1
No files found.
src/runtime/bool.cpp
View file @
7e42a198
...
...
@@ -27,7 +27,7 @@ extern "C" PyObject* PyBool_FromLong(long n) noexcept {
}
extern
"C"
Box
*
boolNonzero
(
BoxedBool
*
v
)
{
return
v
;
return
incref
(
v
)
;
}
extern
"C"
Box
*
boolRepr
(
BoxedBool
*
v
)
{
...
...
src/runtime/types.cpp
View file @
7e42a198
...
...
@@ -4255,7 +4255,7 @@ void setupRuntime() {
attrwrapper_cls
->
tp_mro
=
BoxedTuple
::
create
({
attrwrapper_cls
,
object_cls
});
dict_cls
->
tp_mro
=
BoxedTuple
::
create
({
dict_cls
,
object_cls
});
int_cls
->
tp_mro
=
BoxedTuple
::
create
({
int_cls
,
object_cls
});
bool_cls
->
tp_mro
=
BoxedTuple
::
create
({
bool_cls
,
object_cls
});
bool_cls
->
tp_mro
=
BoxedTuple
::
create
({
bool_cls
,
int_cls
,
object_cls
});
complex_cls
->
tp_mro
=
BoxedTuple
::
create
({
complex_cls
,
object_cls
});
long_cls
->
tp_mro
=
BoxedTuple
::
create
({
long_cls
,
object_cls
});
float_cls
->
tp_mro
=
BoxedTuple
::
create
({
float_cls
,
object_cls
});
...
...
test/tests/bool_functions.py
View file @
7e42a198
# expected: reffail
# Regression test: we rely internally on CompilerType.nonzero() always returning a BOOL,
# in at least these two cases.
...
...
test/tests/bool_passing.py
View file @
7e42a198
# expected: reffail
# Test that we can pass known-bool values through OSRs and what not:
def
f
(
b
):
...
...
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