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
87957462
Commit
87957462
authored
Jul 27, 2015
by
Dong-hee,Na
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue 689
parent
c42d3395
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/runtime/list.cpp
src/runtime/list.cpp
+13
-0
No files found.
src/runtime/list.cpp
View file @
87957462
...
...
@@ -67,6 +67,17 @@ extern "C" Box* listRepr(BoxedList* self) {
std
::
string
O
(
""
);
llvm
::
raw_string_ostream
os
(
O
);
// Implementing Recursive Print of list in same way from Cpython
int
recursive
=
Py_ReprEnter
((
PyObject
*
)
self
);
if
(
recursive
!=
0
)
{
if
(
recursive
<
0
)
return
boxString
(
os
.
str
());
os
<<
"[...]"
;
return
boxString
(
os
.
str
());
}
os
<<
'['
;
for
(
int
i
=
0
;
i
<
self
->
size
;
i
++
)
{
if
(
i
>
0
)
...
...
@@ -79,6 +90,8 @@ extern "C" Box* listRepr(BoxedList* self) {
os
<<
s
->
s
();
}
os
<<
']'
;
Py_ReprLeave
((
PyObject
*
)
self
);
return
boxString
(
os
.
str
());
}
...
...
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