summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-03-04 09:38:52 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-03-04 09:38:52 (GMT)
commitaa158be6233d8df6d87bf6e20f59e62ef2114a44 (patch)
tree413f46c994cf03fbe4558cccf50fdbd325ee8b12 /Modules/arraymodule.c
parentbc2e10e7b6588d2677e970e390e066e235c56dbd (diff)
downloadcpython-aa158be6233d8df6d87bf6e20f59e62ef2114a44.zip
cpython-aa158be6233d8df6d87bf6e20f59e62ef2114a44.tar.gz
cpython-aa158be6233d8df6d87bf6e20f59e62ef2114a44.tar.bz2
Remove tp_print.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 6e79be1..7372a48 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1427,39 +1427,6 @@ PyMethodDef array_methods[] = {
{NULL, NULL} /* sentinel */
};
-static int
-array_print(arrayobject *a, FILE *fp, int flags)
-{
- int ok = 0;
- int i, len;
- PyObject *v;
- len = a->ob_size;
- if (len == 0) {
- fprintf(fp, "array('%c')", a->ob_descr->typecode);
- return ok;
- }
- if (a->ob_descr->typecode == 'c') {
- PyObject *t_empty = PyTuple_New(0);
- fprintf(fp, "array('c', ");
- v = array_tostring(a, t_empty);
- Py_DECREF(t_empty);
- ok = PyObject_Print(v, fp, 0);
- Py_XDECREF(v);
- fprintf(fp, ")");
- return ok;
- }
- fprintf(fp, "array('%c', [", a->ob_descr->typecode);
- for (i = 0; i < len && ok == 0; i++) {
- if (i > 0)
- fprintf(fp, ", ");
- v = (a->ob_descr->getitem)(a, i);
- ok = PyObject_Print(v, fp, 0);
- Py_XDECREF(v);
- }
- fprintf(fp, "])");
- return ok;
-}
-
static PyObject *
array_repr(arrayobject *a)
{
@@ -1719,7 +1686,7 @@ statichere PyTypeObject Arraytype = {
sizeof(arrayobject),
0,
(destructor)array_dealloc, /* tp_dealloc */
- (printfunc)array_print, /* tp_print */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */