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
ea6c3af1
Commit
ea6c3af1
authored
Oct 15, 1996
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added lots of casts to make warnings go away.
parent
3a82c48f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
lib/Components/cPickle/cStringIO.c
lib/Components/cPickle/cStringIO.c
+21
-18
No files found.
lib/Components/cPickle/cStringIO.c
View file @
ea6c3af1
/*
$Id: cStringIO.c,v 1.
5 1996/10/11 21:03:42
jim Exp $
$Id: cStringIO.c,v 1.
6 1996/10/15 18:42:07
jim Exp $
A simple fast partial StringIO replacement.
...
...
@@ -58,6 +58,9 @@
$Log: cStringIO.c,v $
Revision 1.6 1996/10/15 18:42:07 jim
Added lots of casts to make warnings go away.
Revision 1.5 1996/10/11 21:03:42 jim
*** empty log message ***
...
...
@@ -245,10 +248,10 @@ O_readline(self, args)
n
<
s
&&
*
n
!=
'\n'
;
n
++
);
if
(
n
<
s
)
n
++
;
s
=
PyString_FromStringAndSize
(
self
->
buf
+
self
->
pos
,
r
=
PyString_FromStringAndSize
(
self
->
buf
+
self
->
pos
,
n
-
self
->
buf
-
self
->
pos
);
self
->
pos
=
n
-
self
->
buf
;
return
s
;
return
r
;
}
...
...
@@ -301,7 +304,7 @@ O_write(self, args)
}
Py_INCREF
(
self
);
return
self
;
return
(
PyObject
*
)
self
;
}
static
PyObject
*
...
...
@@ -489,7 +492,7 @@ static PyTypeObject Otype = {
0
,
/*tp_as_sequence*/
0
,
/*tp_as_mapping*/
(
hashfunc
)
0
,
/*tp_hash*/
(
bi
naryfunc
)
0
,
/*tp_call*/
(
ter
naryfunc
)
0
,
/*tp_call*/
(
reprfunc
)
0
,
/*tp_str*/
/* Space for future expansion */
...
...
@@ -515,15 +518,15 @@ I_close(self, args)
}
static
struct
PyMethodDef
I_methods
[]
=
{
{
"read"
,
O_read
,
1
,
O_read__doc__
},
{
"readline"
,
O_readline
,
0
,
O_readline__doc__
},
{
"reset"
,
O_reset
,
0
,
O_reset__doc__
},
{
"seek"
,
O_seek
,
1
,
O_seek__doc__
},
{
"tell"
,
O_tell
,
0
,
O_tell__doc__
},
{
"truncate"
,
O_truncate
,
0
,
O_truncate__doc__
},
{
"isatty"
,
O_isatty
,
0
,
O_isatty__doc__
},
{
"close"
,
I_close
,
0
,
O_close__doc__
},
{
"flush"
,
O_flush
,
0
,
O_flush__doc__
},
{
"read"
,
(
PyCFunction
)
O_read
,
1
,
O_read__doc__
},
{
"readline"
,
(
PyCFunction
)
O_readline
,
0
,
O_readline__doc__
},
{
"reset"
,
(
PyCFunction
)
O_reset
,
0
,
O_reset__doc__
},
{
"seek"
,
(
PyCFunction
)
O_seek
,
1
,
O_seek__doc__
},
{
"tell"
,
(
PyCFunction
)
O_tell
,
0
,
O_tell__doc__
},
{
"truncate"
,
(
PyCFunction
)
O_truncate
,
0
,
O_truncate__doc__
},
{
"isatty"
,
(
PyCFunction
)
O_isatty
,
0
,
O_isatty__doc__
},
{
"close"
,
(
PyCFunction
)
I_close
,
0
,
O_close__doc__
},
{
"flush"
,
(
PyCFunction
)
O_flush
,
0
,
O_flush__doc__
},
{
NULL
,
NULL
}
/* sentinel */
};
...
...
@@ -588,7 +591,7 @@ static PyTypeObject Itype = {
0
,
/*tp_as_sequence*/
0
,
/*tp_as_mapping*/
(
hashfunc
)
0
,
/*tp_hash*/
(
bi
naryfunc
)
0
,
/*tp_call*/
(
ter
naryfunc
)
0
,
/*tp_call*/
(
reprfunc
)
0
,
/*tp_str*/
/* Space for future expansion */
...
...
@@ -612,14 +615,14 @@ IO_StringIO(self, args)
PyObject
*
s
=
0
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"|O"
,
&
s
))
return
NULL
;
if
(
s
)
return
newIobject
(
s
);
return
newOobject
(
128
);
if
(
s
)
return
(
PyObject
*
)
newIobject
(
s
);
return
(
PyObject
*
)
newOobject
(
128
);
}
/* List of methods defined in the module */
static
struct
PyMethodDef
IO_methods
[]
=
{
{
"StringIO"
,
IO_StringIO
,
1
,
IO_StringIO__doc__
},
{
"StringIO"
,
(
PyCFunction
)
IO_StringIO
,
1
,
IO_StringIO__doc__
},
{
NULL
,
NULL
}
/* sentinel */
};
...
...
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