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
cc2add2a
Commit
cc2add2a
authored
Apr 16, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_cmath.py
parent
a0412c43
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
5 deletions
+9
-5
from_cpython/Lib/test/test_array.py
from_cpython/Lib/test/test_array.py
+1
-0
from_cpython/Lib/test/test_ast.py
from_cpython/Lib/test/test_ast.py
+1
-0
from_cpython/Lib/test/test_cmath.py
from_cpython/Lib/test/test_cmath.py
+0
-1
src/runtime/float.cpp
src/runtime/float.cpp
+1
-0
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+6
-4
No files found.
from_cpython/Lib/test/test_array.py
View file @
cc2add2a
# expected: reffail
# - fails in interpreter due to keeping refcounts a bit too long
"""Test the arraymodule.
Roger E. Masse
"""
...
...
from_cpython/Lib/test/test_ast.py
View file @
cc2add2a
# expected: reffail
# - generator abandonment
import
sys
,
itertools
,
unittest
from
test
import
test_support
import
ast
...
...
from_cpython/Lib/test/test_cmath.py
View file @
cc2add2a
# expected: reffail
from
test.test_support
import
run_unittest
from
test.test_math
import
parse_testfile
import
unittest
...
...
src/runtime/float.cpp
View file @
cc2add2a
...
...
@@ -157,6 +157,7 @@ extern "C" double PyFloat_AsDouble(PyObject* o) noexcept {
fo
=
(
BoxedFloat
*
)(
*
nb
->
nb_float
)(
o
);
if
(
fo
==
NULL
)
return
-
1
;
AUTO_DECREF
(
fo
);
if
(
!
PyFloat_Check
(
fo
))
{
PyErr_SetString
(
PyExc_TypeError
,
"nb_float should return float object"
);
return
-
1
;
...
...
src/runtime/objmodel.cpp
View file @
cc2add2a
...
...
@@ -2313,7 +2313,8 @@ Box* getattrInternalEx(Box* obj, BoxedString* attr, GetattrRewriteArgs* rewrite_
RewriterVar
*
r_rtn
=
rewrite_args
->
rewriter
->
call
(
true
,
(
void
*
)
Helper
::
call
,
rewrite_args
->
obj
,
rewrite_args
->
rewriter
->
loadConst
((
intptr_t
)
attr
,
Location
::
forArg
(
1
)),
rewrite_args
->
rewriter
->
loadConst
(
cls_only
,
Location
::
forArg
(
2
)));
rewrite_args
->
rewriter
->
loadConst
(
cls_only
,
Location
::
forArg
(
2
)))
->
setType
(
RefType
::
OWNED
);
rewrite_args
->
setReturn
(
r_rtn
,
ReturnConvention
::
NOEXC_POSSIBLE
);
return
Helper
::
call
(
obj
,
attr
,
cls_only
);
}
...
...
@@ -2584,9 +2585,10 @@ Box* getattrInternalGeneric(Box* obj, BoxedString* attr, GetattrRewriteArgs* rew
static
Box
*
call
(
Box
*
obj
,
BoxedString
*
attr
)
{
return
xincref
(
obj
->
getattr
(
attr
));
}
};
RewriterVar
*
r_rtn
=
rewrite_args
->
rewriter
->
call
(
false
,
(
void
*
)
Helper
::
call
,
rewrite_args
->
obj
,
rewrite_args
->
rewriter
->
loadConst
((
intptr_t
)
attr
,
Location
::
forArg
(
1
)));
RewriterVar
*
r_rtn
=
rewrite_args
->
rewriter
->
call
(
false
,
(
void
*
)
Helper
::
call
,
rewrite_args
->
obj
,
rewrite_args
->
rewriter
->
loadConst
(
(
intptr_t
)
attr
,
Location
::
forArg
(
1
)))
->
setType
(
RefType
::
OWNED
);
rewrite_args
->
setReturn
(
r_rtn
,
ReturnConvention
::
NOEXC_POSSIBLE
);
return
Helper
::
call
(
obj
,
attr
);
}
...
...
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