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
823f5bf7
Commit
823f5bf7
authored
Jul 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix return type for floatTrunc
parent
6dea1b37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
src/runtime/float.cpp
src/runtime/float.cpp
+1
-1
test/tests/float.py
test/tests/float.py
+2
-0
No files found.
src/runtime/float.cpp
View file @
823f5bf7
...
...
@@ -1483,7 +1483,7 @@ void setupFloat() {
float_cls
->
giveAttr
(
"__str__"
,
new
BoxedFunction
(
boxRTFunction
((
void
*
)
floatStr
,
STR
,
1
)));
float_cls
->
giveAttr
(
"__repr__"
,
new
BoxedFunction
(
boxRTFunction
((
void
*
)
floatRepr
,
STR
,
1
)));
float_cls
->
giveAttr
(
"__trunc__"
,
new
BoxedFunction
(
boxRTFunction
((
void
*
)
floatTrunc
,
BOXED_INT
,
1
)));
float_cls
->
giveAttr
(
"__trunc__"
,
new
BoxedFunction
(
boxRTFunction
((
void
*
)
floatTrunc
,
UNKNOWN
,
1
)));
float_cls
->
giveAttr
(
"__hash__"
,
new
BoxedFunction
(
boxRTFunction
((
void
*
)
floatHash
,
BOXED_INT
,
1
)));
float_cls
->
giveAttr
(
"real"
,
new
(
pyston_getset_cls
)
BoxedGetsetDescriptor
(
floatFloat
,
NULL
,
NULL
));
...
...
test/tests/float.py
View file @
823f5bf7
...
...
@@ -93,3 +93,5 @@ print 0.0
print
-
0.0
print
-
(
0.0
)
print
-
(
-
0.0
)
print
repr
((
1e100
).
__trunc__
())
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