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
815129b1
Commit
815129b1
authored
Apr 18, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1136 from Daetalus/ref_nexedi_test_long
add refcounting annotation that make test_long pass
parents
cc2add2a
f73778fa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
+2
-4
from_cpython/Lib/test/test_long.py
from_cpython/Lib/test/test_long.py
+0
-1
src/runtime/classobj.cpp
src/runtime/classobj.cpp
+0
-1
src/runtime/long.cpp
src/runtime/long.cpp
+2
-2
No files found.
from_cpython/Lib/test/test_long.py
View file @
815129b1
# expected: reffail
import
unittest
import
sys
...
...
src/runtime/classobj.cpp
View file @
815129b1
...
...
@@ -1575,7 +1575,6 @@ Box* instanceInt(Box* _inst) {
}
Box
*
truncated
=
instanceTrunc
(
inst
);
AUTO_DECREF
(
truncated
);
/* __trunc__ is specified to return an Integral type, but
int() needs to return an int. */
Box
*
res
=
_PyNumber_ConvertIntegralToInt
(
truncated
,
"__trunc__ returned non-Integral (type %.200s)"
);
...
...
src/runtime/long.cpp
View file @
815129b1
...
...
@@ -712,11 +712,11 @@ template <ExceptionStyle S> Box* _longNew(Box* val, Box* _base) noexcept(S == CA
Box
*
srepr
=
PyObject_Repr
(
val
);
if
(
S
==
CAPI
)
{
PyErr_Format
(
PyExc_ValueError
,
"invalid literal for long() with base %d: '%s'"
,
base
,
PyString_AS_STRING
(
srepr
));
PyString_AS_STRING
(
autoDecref
(
srepr
)
));
return
NULL
;
}
else
{
raiseExcHelper
(
ValueError
,
"invalid literal for long() with base %d: '%s'"
,
base
,
PyString_AS_STRING
(
srepr
));
PyString_AS_STRING
(
autoDecref
(
srepr
)
));
}
}
Box
*
r
=
PyLong_FromString
(
s
->
data
(),
NULL
,
base
);
...
...
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