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