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
4c743cb6
Commit
4c743cb6
authored
Jul 28, 2015
by
Dong-hee,Na
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implementation of dictionary's recursive printing (format)
parent
79b6133a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
src/runtime/dict.cpp
src/runtime/dict.cpp
+11
-12
No files found.
src/runtime/dict.cpp
View file @
4c743cb6
...
...
@@ -34,18 +34,17 @@ Box* dictRepr(BoxedDict* self) {
int
status
=
Py_ReprEnter
((
PyObject
*
)
self
);
std
::
vector
<
char
>
chars
;
if
(
status
!=
0
)
{
if
(
status
<
0
)
return
boxString
(
llvm
::
StringRef
(
&
chars
[
0
],
chars
.
size
()));
chars
.
push_back
(
'{'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'}'
);
return
boxString
(
llvm
::
StringRef
(
&
chars
[
0
],
chars
.
size
()));
if
(
status
!=
0
)
{
if
(
status
<
0
)
return
boxString
(
llvm
::
StringRef
(
&
chars
[
0
],
chars
.
size
()));
chars
.
push_back
(
'{'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'.'
);
chars
.
push_back
(
'}'
);
return
boxString
(
llvm
::
StringRef
(
&
chars
[
0
],
chars
.
size
()));
}
chars
.
push_back
(
'{'
);
bool
first
=
true
;
...
...
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