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
b4a5816d
Commit
b4a5816d
authored
Jul 26, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revese the pyston changes in PyString_Formatlong
parent
0ae78250
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
src/runtime/str.cpp
src/runtime/str.cpp
+3
-13
No files found.
src/runtime/str.cpp
View file @
b4a5816d
...
@@ -428,10 +428,6 @@ Py_LOCAL_INLINE(PyObject*) getnextarg(PyObject* args, Py_ssize_t arglen, Py_ssiz
...
@@ -428,10 +428,6 @@ Py_LOCAL_INLINE(PyObject*) getnextarg(PyObject* args, Py_ssize_t arglen, Py_ssiz
extern
"C"
PyObject
*
_PyString_FormatLong
(
PyObject
*
val
,
int
flags
,
int
prec
,
int
type
,
const
char
**
pbuf
,
extern
"C"
PyObject
*
_PyString_FormatLong
(
PyObject
*
val
,
int
flags
,
int
prec
,
int
type
,
const
char
**
pbuf
,
int
*
plen
)
noexcept
{
int
*
plen
)
noexcept
{
// Pyston change:
RELEASE_ASSERT
(
val
->
cls
==
long_cls
,
""
);
PyObject
*
result
=
NULL
;
PyObject
*
result
=
NULL
;
char
*
buf
;
char
*
buf
;
Py_ssize_t
i
;
Py_ssize_t
i
;
...
@@ -444,21 +440,15 @@ extern "C" PyObject* _PyString_FormatLong(PyObject* val, int flags, int prec, in
...
@@ -444,21 +440,15 @@ extern "C" PyObject* _PyString_FormatLong(PyObject* val, int flags, int prec, in
switch
(
type
)
{
switch
(
type
)
{
case
'd'
:
case
'd'
:
case
'u'
:
case
'u'
:
// Pyston change:
result
=
Py_TYPE
(
val
)
->
tp_str
(
val
);
// result = Py_TYPE(val)->tp_str(val);
result
=
longStr
((
BoxedLong
*
)
val
);
break
;
break
;
case
'o'
:
case
'o'
:
// Pyston change:
result
=
Py_TYPE
(
val
)
->
tp_as_number
->
nb_oct
(
val
);
// result = Py_TYPE(val)->tp_as_number->nb_oct(val);
result
=
longOct
((
BoxedLong
*
)
val
);
break
;
break
;
case
'x'
:
case
'x'
:
case
'X'
:
case
'X'
:
numnondigits
=
2
;
numnondigits
=
2
;
// Pyston change:
result
=
Py_TYPE
(
val
)
->
tp_as_number
->
nb_hex
(
val
);
// result = Py_TYPE(val)->tp_as_number->nb_hex(val);
result
=
longHex
((
BoxedLong
*
)
val
);
break
;
break
;
default:
default:
assert
(
!
"'type' not in [duoxX]"
);
assert
(
!
"'type' not in [duoxX]"
);
...
...
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