diff Objects/listobject.c @ 42477:e7fd327e0c19

Kill all uses and definitions of tp_print under Objects/. (Others will follow.) Finally kill intobject.c, which was #ifdef'ed out a long time ago.
author Guido van Rossum <guido@python.org>
date Tue, 07 Aug 2007 19:51:00 +0000
parents e70cdce0e8b2
children ce52cd71a8d9
line wrap: on
line diff
--- a/Objects/listobject.c	Tue Aug 07 19:42:11 2007 +0000
+++ b/Objects/listobject.c	Tue Aug 07 19:51:00 2007 +0000
@@ -272,33 +272,6 @@
 	Py_TRASHCAN_SAFE_END(op)
 }
 
-static int
-list_print(PyListObject *op, FILE *fp, int flags)
-{
-	int rc;
-	Py_ssize_t i;
-
-	rc = Py_ReprEnter((PyObject*)op);
-	if (rc != 0) {
-		if (rc < 0)
-			return rc;
-		fprintf(fp, "[...]");
-		return 0;
-	}
-	fprintf(fp, "[");
-	for (i = 0; i < Py_Size(op); i++) {
-		if (i > 0)
-			fprintf(fp, ", ");
-		if (PyObject_Print(op->ob_item[i], fp, 0) != 0) {
-			Py_ReprLeave((PyObject *)op);
-			return -1;
-		}
-	}
-	fprintf(fp, "]");
-	Py_ReprLeave((PyObject *)op);
-	return 0;
-}
-
 static PyObject *
 list_repr(PyListObject *v)
 {
@@ -2665,7 +2638,7 @@
 	sizeof(PyListObject),
 	0,
 	(destructor)list_dealloc,		/* tp_dealloc */
-	(printfunc)list_print,			/* tp_print */
+	0,					/* tp_print */
 	0,					/* tp_getattr */
 	0,					/* tp_setattr */
 	0,					/* tp_compare */