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
8ab333a4
Commit
8ab333a4
authored
Mar 29, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get print_function working
parent
76e73330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/runtime/builtin_modules/builtins.cpp
src/runtime/builtin_modules/builtins.cpp
+5
-0
No files found.
src/runtime/builtin_modules/builtins.cpp
View file @
8ab333a4
...
...
@@ -1479,16 +1479,19 @@ static PyObject* builtin_print(PyObject* self, PyObject* args, PyObject* kwds) n
if
(
dummy_args
==
NULL
)
{
if
(
!
(
dummy_args
=
PyTuple_New
(
0
)))
return
NULL
;
constants
.
push_back
(
dummy_args
);
}
if
(
str_newline
==
NULL
)
{
str_newline
=
PyString_FromString
(
"
\n
"
);
if
(
str_newline
==
NULL
)
return
NULL
;
constants
.
push_back
(
str_newline
);
str_space
=
PyString_FromString
(
" "
);
if
(
str_space
==
NULL
)
{
Py_CLEAR
(
str_newline
);
return
NULL
;
}
constants
.
push_back
(
str_space
);
#ifdef Py_USING_UNICODE
unicode_newline
=
PyUnicode_FromString
(
"
\n
"
);
if
(
unicode_newline
==
NULL
)
{
...
...
@@ -1496,6 +1499,7 @@ static PyObject* builtin_print(PyObject* self, PyObject* args, PyObject* kwds) n
Py_CLEAR
(
str_space
);
return
NULL
;
}
constants
.
push_back
(
unicode_newline
);
unicode_space
=
PyUnicode_FromString
(
" "
);
if
(
unicode_space
==
NULL
)
{
Py_CLEAR
(
str_newline
);
...
...
@@ -1503,6 +1507,7 @@ static PyObject* builtin_print(PyObject* self, PyObject* args, PyObject* kwds) n
Py_CLEAR
(
unicode_space
);
return
NULL
;
}
constants
.
push_back
(
unicode_space
);
#endif
}
if
(
!
PyArg_ParseTupleAndKeywords
(
dummy_args
,
kwds
,
"|OOO:print"
,
const_cast
<
char
**>
(
kwlist
),
&
sep
,
&
end
,
&
file
))
...
...
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