Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
31e7e02d
Commit
31e7e02d
authored
Feb 08, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added writelines fix from Guido.
parent
9b6740ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
lib/Components/cPickle/cStringIO.c
lib/Components/cPickle/cStringIO.c
+18
-6
No files found.
lib/Components/cPickle/cStringIO.c
View file @
31e7e02d
/*
* $Id: cStringIO.c,v 1.2
7 1998/12/15 20:32:13
jim Exp $
* $Id: cStringIO.c,v 1.2
8 1999/02/08 23:24:40
jim Exp $
*
* Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
* All rights reserved.
...
...
@@ -78,7 +78,7 @@ static char cStringIO_module_documentation[] =
"If someone else wants to provide a more complete implementation,
\n
"
"go for it. :-)
\n
"
"
\n
"
"$Id: cStringIO.c,v 1.2
7 1998/12/15 20:32:13
jim Exp $
\n
"
"$Id: cStringIO.c,v 1.2
8 1999/02/08 23:24:40
jim Exp $
\n
"
;
#include "Python.h"
...
...
@@ -343,13 +343,14 @@ O_flush(Oobject *self, PyObject *args) {
}
static
char
O_writelines__doc__
[]
=
"blah"
;
static
char
O_writelines__doc__
[]
=
"writelines(sequence_of_strings): write each string"
;
static
PyObject
*
O_writelines
(
Oobject
*
self
,
PyObject
*
args
)
{
PyObject
*
string_module
=
0
;
static
PyObject
*
string_joinfields
=
0
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O"
,
args
))
{
UNLESS
(
PyArg_ParseTuple
(
args
,
"O"
,
&
args
))
{
return
NULL
;
}
...
...
@@ -370,8 +371,19 @@ O_writelines(Oobject *self, PyObject *args) {
return
NULL
;
}
return
O_write
(
self
,
PyObject_CallFunction
(
string_joinfields
,
"Os"
,
args
,
""
));
{
PyObject
*
x
=
PyObject_CallFunction
(
string_joinfields
,
"Os"
,
args
,
""
);
if
(
x
==
NULL
)
return
NULL
;
args
=
Py_BuildValue
(
"(O)"
,
x
);
Py_DECREF
(
x
);
if
(
args
==
NULL
)
return
NULL
;
x
=
O_write
(
self
,
args
);
Py_DECREF
(
args
);
return
x
;
}
}
static
struct
PyMethodDef
O_methods
[]
=
{
...
...
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