[Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.67,2.68
Martin v. L?wis
loewis@users.sourceforge.net
Mon, 04 Mar 2002 01:38:55 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv26372
Modified Files:
arraymodule.c
Log Message:
Remove tp_print.
Index: arraymodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v
retrieving revision 2.67
retrieving revision 2.68
diff -C2 -d -r2.67 -r2.68
*** arraymodule.c 1 Mar 2002 10:27:01 -0000 2.67
--- arraymodule.c 4 Mar 2002 09:38:52 -0000 2.68
***************
*** 1428,1464 ****
};
- 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)
--- 1428,1431 ----
***************
*** 1720,1724 ****
0,
(destructor)array_dealloc, /* tp_dealloc */
! (printfunc)array_print, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
--- 1687,1691 ----
0,
(destructor)array_dealloc, /* tp_dealloc */
! 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */