Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
a1dc8203
Commit
a1dc8203
authored
May 10, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code simplifications and fixes in printing utility code
parent
00ff6bdd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Cython/Utility/Printing.c
Cython/Utility/Printing.c
+4
-6
No files found.
Cython/Utility/Printing.c
View file @
a1dc8203
...
@@ -28,7 +28,6 @@ static PyObject *__Pyx_GetStdout(void) {
...
@@ -28,7 +28,6 @@ static PyObject *__Pyx_GetStdout(void) {
}
}
static
int
__Pyx_Print
(
PyObject
*
f
,
PyObject
*
arg_tuple
,
int
newline
)
{
static
int
__Pyx_Print
(
PyObject
*
f
,
PyObject
*
arg_tuple
,
int
newline
)
{
PyObject
*
v
;
int
i
;
int
i
;
if
(
!
f
)
{
if
(
!
f
)
{
...
@@ -37,6 +36,7 @@ static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
...
@@ -37,6 +36,7 @@ static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
}
}
Py_INCREF
(
f
);
Py_INCREF
(
f
);
for
(
i
=
0
;
i
<
PyTuple_GET_SIZE
(
arg_tuple
);
i
++
)
{
for
(
i
=
0
;
i
<
PyTuple_GET_SIZE
(
arg_tuple
);
i
++
)
{
PyObject
*
v
;
if
(
PyFile_SoftSpace
(
f
,
1
))
{
if
(
PyFile_SoftSpace
(
f
,
1
))
{
if
(
PyFile_WriteString
(
" "
,
f
)
<
0
)
if
(
PyFile_WriteString
(
" "
,
f
)
<
0
)
goto
error
;
goto
error
;
...
@@ -150,8 +150,8 @@ static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
...
@@ -150,8 +150,8 @@ static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
error:
error:
Py_DECREF
(
f
);
Py_DECREF
(
f
);
return
-
1
;
return
-
1
;
/* the line below is just to avoid compiler
/* the line below is just to avoid
C
compiler
*
compiler
warnings about unused functions */
* warnings about unused functions */
return
__Pyx_Print
(
f
,
NULL
,
0
);
return
__Pyx_Print
(
f
,
NULL
,
0
);
}
}
...
@@ -159,11 +159,9 @@ error:
...
@@ -159,11 +159,9 @@ error:
static
int
__Pyx_PrintOne
(
PyObject
*
stream
,
PyObject
*
o
)
{
static
int
__Pyx_PrintOne
(
PyObject
*
stream
,
PyObject
*
o
)
{
int
res
;
int
res
;
PyObject
*
arg_tuple
=
PyTuple_
New
(
1
);
PyObject
*
arg_tuple
=
PyTuple_
Pack
(
1
,
o
);
if
(
unlikely
(
!
arg_tuple
))
if
(
unlikely
(
!
arg_tuple
))
return
-
1
;
return
-
1
;
Py_INCREF
(
o
);
PyTuple_SET_ITEM
(
arg_tuple
,
0
,
o
);
res
=
__Pyx_Print
(
stream
,
arg_tuple
,
1
);
res
=
__Pyx_Print
(
stream
,
arg_tuple
,
1
);
Py_DECREF
(
arg_tuple
);
Py_DECREF
(
arg_tuple
);
return
res
;
return
res
;
...
...
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