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
a8ac40c3
Commit
a8ac40c3
authored
Jul 22, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline boxBool more
parent
d9709d1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
src/runtime/inline/boxing.h
src/runtime/inline/boxing.h
+0
-12
src/runtime/types.h
src/runtime/types.h
+8
-2
No files found.
src/runtime/inline/boxing.h
View file @
a8ac40c3
...
...
@@ -31,18 +31,6 @@ extern "C" inline Box* boxComplex(double r, double i) {
return
new
BoxedComplex
(
r
,
i
);
}
extern
"C"
inline
Box
*
boxBool
(
bool
b
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
inline
Box
*
boxBool
(
bool
b
)
{
Box
*
rtn
=
b
?
True
:
False
;
return
rtn
;
}
extern
"C"
inline
Box
*
boxBoolNegated
(
bool
b
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
inline
Box
*
boxBoolNegated
(
bool
b
)
{
Box
*
rtn
=
b
?
False
:
True
;
return
rtn
;
}
extern
"C"
inline
bool
unboxBool
(
Box
*
b
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
inline
bool
unboxBool
(
Box
*
b
)
{
assert
(
b
->
cls
==
bool_cls
);
...
...
src/runtime/types.h
View file @
a8ac40c3
...
...
@@ -134,8 +134,14 @@ extern "C" {
extern
BoxedModule
*
sys_module
,
*
builtins_module
,
*
math_module
,
*
time_module
,
*
thread_module
;
}
extern
"C"
Box
*
boxBool
(
bool
);
extern
"C"
Box
*
boxBoolNegated
(
bool
);
extern
"C"
inline
Box
*
boxBool
(
bool
b
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
inline
Box
*
boxBool
(
bool
b
)
{
return
b
?
True
:
False
;
}
extern
"C"
inline
Box
*
boxBoolNegated
(
bool
b
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
inline
Box
*
boxBoolNegated
(
bool
b
)
{
return
b
?
False
:
True
;
}
extern
"C"
Box
*
boxInt
(
i64
)
__attribute__
((
visibility
(
"default"
)));
extern
"C"
i64
unboxInt
(
Box
*
);
extern
"C"
Box
*
boxFloat
(
double
d
);
...
...
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