Kill off softspace completely (except in formatter.py which seems to have
a different feature with the same name).
The change to test_doctest.txt reduces the doctest failures to 3.
diff --git a/Modules/bz2module.c b/Modules/bz2module.c
index 3c6daa9..9b39442 100644
--- a/Modules/bz2module.c
+++ b/Modules/bz2module.c
@@ -102,8 +102,6 @@
char* f_bufend; /* Points after last occupied position */
char* f_bufptr; /* Current buffer position */
- int f_softspace; /* Flag used by 'print' command */
-
int f_univ_newline; /* Handle any newline convention */
int f_newlinetypes; /* Types of newlines seen */
int f_skipnextlf; /* Skip next \n */
@@ -813,8 +811,6 @@
goto cleanup;
}
- self->f_softspace = 0;
-
Py_BEGIN_ALLOW_THREADS
BZ2_bzWrite (&bzerror, self->fp, buf, len);
self->pos += len;
@@ -934,8 +930,6 @@
}
}
- self->f_softspace = 0;
-
/* Since we are releasing the global lock, the
following code may *not* execute Python code. */
Py_BEGIN_ALLOW_THREADS
@@ -1265,18 +1259,6 @@
/* ===================================================================== */
-/* Members of BZ2File_Type. */
-
-#undef OFF
-#define OFF(x) offsetof(BZ2FileObject, x)
-
-static PyMemberDef BZ2File_members[] = {
- {"softspace", T_INT, OFF(f_softspace), 0,
- "flag indicating that a space needs to be printed; used by print"},
- {NULL} /* Sentinel */
-};
-
-/* ===================================================================== */
/* Slot definitions for BZ2File_Type. */
static int
@@ -1501,7 +1483,7 @@
(getiterfunc)BZ2File_getiter, /*tp_iter*/
(iternextfunc)BZ2File_iternext, /*tp_iternext*/
BZ2File_methods, /*tp_methods*/
- BZ2File_members, /*tp_members*/
+ 0, /*tp_members*/
BZ2File_getset, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 3f762b0..2ed1485 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -57,7 +57,6 @@
Py_ssize_t pos, string_size;
Py_ssize_t buf_size;
- int softspace;
} Oobject;
/* Declarations for objects of type StringI */
@@ -489,13 +488,6 @@
{NULL, NULL} /* sentinel */
};
-static PyMemberDef O_memberlist[] = {
- {"softspace", T_INT, offsetof(Oobject, softspace), 0,
- "flag indicating that a space needs to be printed; used by print"},
- /* getattr(f, "closed") is implemented without this table */
- {NULL} /* Sentinel */
-};
-
static void
O_dealloc(Oobject *self) {
if (self->buf != NULL)
@@ -536,7 +528,7 @@
PyObject_SelfIter, /*tp_iter */
(iternextfunc)IO_iternext, /*tp_iternext */
O_methods, /*tp_methods */
- O_memberlist, /*tp_members */
+ 0, /*tp_members */
file_getsetlist, /*tp_getset */
};
@@ -549,7 +541,6 @@
return NULL;
self->pos=0;
self->string_size = 0;
- self->softspace = 0;
self->buf = (char *)malloc(size);
if (!self->buf) {