Mercurial > cpython-lru_cache-weakref
diff Objects/tupleobject.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 | 27f0289b6835 |
line wrap: on
line diff
--- a/Objects/tupleobject.c Tue Aug 07 19:42:11 2007 +0000 +++ b/Objects/tupleobject.c Tue Aug 07 19:51:00 2007 +0000 @@ -184,23 +184,6 @@ Py_TRASHCAN_SAFE_END(op) } -static int -tupleprint(PyTupleObject *op, FILE *fp, int flags) -{ - Py_ssize_t i; - 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) - return -1; - } - if (Py_Size(op) == 1) - fprintf(fp, ","); - fprintf(fp, ")"); - return 0; -} - static PyObject * tuplerepr(PyTupleObject *v) { @@ -653,7 +636,7 @@ sizeof(PyTupleObject) - sizeof(PyObject *), sizeof(PyObject *), (destructor)tupledealloc, /* tp_dealloc */ - (printfunc)tupleprint, /* tp_print */ + 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */
