Commit 09f0b213 authored by Jim Fulton's avatar Jim Fulton

*** empty log message ***

parent 5d1654e9
/*
$Id: cStringIO.c,v 1.15 1997/02/07 17:11:55 jim Exp $
$Id: cStringIO.c,v 1.16 1997/02/17 22:17:43 jim Exp $
A simple fast partial StringIO replacement.
......@@ -58,9 +58,8 @@
$Log: cStringIO.c,v $
Revision 1.15 1997/02/07 17:11:55 jim
Added code to ease compilation on Windoze and removed some extraneous
variable declarations.
Revision 1.16 1997/02/17 22:17:43 jim
*** empty log message ***
Revision 1.14 1997/01/24 19:56:24 chris
undid last change
......@@ -155,7 +154,7 @@ typedef struct {
int pos, string_size, buf_size, closed;
} Oobject;
static PyTypeObject Otype;
staticforward PyTypeObject Otype;
/* ---------------------------------------------------------------- */
......@@ -168,7 +167,7 @@ typedef struct {
PyObject *pbuf;
} Iobject;
static PyTypeObject Itype;
staticforward PyTypeObject Itype;
/* ---------------------------------------------------------------- */
......@@ -479,9 +478,8 @@ static char Otype__doc__[] =
"Simple type for output to strings."
;
static PyTypeObject Otype_value() {
PyTypeObject Otype = {
PyObject_HEAD_INIT(&PyType_Type)
static PyTypeObject Otype = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"StringO", /*tp_name*/
sizeof(Oobject), /*tp_basicsize*/
......@@ -503,9 +501,7 @@ static PyTypeObject Otype_value() {
/* Space for future expansion */
0L,0L,0L,0L,
Otype__doc__ /* Documentation string */
};
return Otype;
}
};
/* End of code for StringO objects */
/* -------------------------------------------------------- */
......@@ -572,9 +568,8 @@ static char Itype__doc__[] =
"Simple type for treating strings as input file streams"
;
static PyTypeObject Itype_value() {
PyTypeObject Itype = {
PyObject_HEAD_INIT(&PyType_Type)
static PyTypeObject Itype = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"StringI", /*tp_name*/
sizeof(Iobject), /*tp_basicsize*/
......@@ -596,9 +591,7 @@ static PyTypeObject Itype_value() {
/* Space for future expansion */
0L,0L,0L,0L,
Itype__doc__ /* Documentation string */
};
return Itype;
}
};
/* End of code for StringI objects */
/* -------------------------------------------------------- */
......@@ -652,8 +645,8 @@ initcStringIO() {
d = PyModule_GetDict(m);
/* Export C API */
Itype=Itype_value();
Otype=Otype_value();
Itype.ob_type=&PyType_Type;
Otype.ob_type=&PyType_Type;
PyDict_SetItemString(d,"cStringIO_CAPI", PyCObject_FromVoidPtr(&CAPI,NULL));
/* Export Types */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment