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
ffe8f34d
Commit
ffe8f34d
authored
Sep 04, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in close/dealloc.
parent
a3cd7ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
lib/Components/cPickle/cStringIO.c
lib/Components/cPickle/cStringIO.c
+16
-6
No files found.
lib/Components/cPickle/cStringIO.c
View file @
ffe8f34d
/*
$Id: cStringIO.c,v 1.2
1 1997/06/19 18:51:42
jim Exp $
$Id: cStringIO.c,v 1.2
2 1997/09/04 19:51:03
jim Exp $
A simple fast partial StringIO replacement.
...
...
@@ -85,7 +85,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
1 1997/06/19 18:51:42
jim Exp $
\n
"
"$Id: cStringIO.c,v 1.2
2 1997/09/04 19:51:03
jim Exp $
\n
"
;
#include "Python.h"
...
...
@@ -314,7 +314,10 @@ static char O_close__doc__[] = "close(): explicitly release resources held.";
static
PyObject
*
O_close
(
Oobject
*
self
,
PyObject
*
args
)
{
free
(
self
->
buf
);
if
(
self
->
buf
)
{
free
(
self
->
buf
);
self
->
buf
=
NULL
;
}
self
->
pos
=
self
->
string_size
=
self
->
buf_size
=
0
;
self
->
closed
=
1
;
...
...
@@ -392,7 +395,7 @@ static struct PyMethodDef O_methods[] = {
static
void
O_dealloc
(
Oobject
*
self
)
{
free
(
self
->
buf
);
if
(
self
->
buf
)
free
(
self
->
buf
);
PyMem_DEL
(
self
);
}
...
...
@@ -475,7 +478,11 @@ newOobject(int size) {
static
PyObject
*
I_close
(
Iobject
*
self
,
PyObject
*
args
)
{
Py_DECREF
(
self
->
pbuf
);
if
(
self
->
pbuf
)
{
Py_DECREF
(
self
->
pbuf
);
self
->
pbuf
=
0
;
}
self
->
pos
=
self
->
string_size
=
0
;
self
->
closed
=
1
;
...
...
@@ -499,7 +506,7 @@ static struct PyMethodDef I_methods[] = {
static
void
I_dealloc
(
Iobject
*
self
)
{
Py_DECREF
(
self
->
pbuf
);
Py_
X
DECREF
(
self
->
pbuf
);
PyMem_DEL
(
self
);
}
...
...
@@ -627,6 +634,9 @@ initcStringIO() {
/******************************************************************************
$Log: cStringIO.c,v $
Revision 1.22 1997/09/04 19:51:03 jim
Fixed bug in close/dealloc.
Revision 1.21 1997/06/19 18:51:42 jim
Added ident string.
...
...
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