summaryrefslogtreecommitdiff
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-07 19:51:00 +0000
committerGuido van Rossum <guido@python.org>2007-08-07 19:51:00 +0000
commitfcc36bb804b491d32e2c99ddf3f7f6b92ec60372 (patch)
tree715a4e03552d7b64d65b4e017712016e46ffbf1f /Objects/dictobject.c
parentebedf7a4122ed47e7a22286be98536f15be05168 (diff)
downloadcpython-fcc36bb804b491d32e2c99ddf3f7f6b92ec60372.tar.gz
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.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 2a9c40c138..1ae38d5e49 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -886,51 +886,6 @@ dict_dealloc(register dictobject *mp)
Py_TRASHCAN_SAFE_END(mp)
}
-static int
-dict_print(register dictobject *mp, register FILE *fp, register int flags)
-{
- register Py_ssize_t i;
- register Py_ssize_t any;
- int status;
-
- status = Py_ReprEnter((PyObject*)mp);
- if (status != 0) {
- if (status < 0)
- return status;
- fprintf(fp, "{...}");
- return 0;
- }
-
- fprintf(fp, "{");
- any = 0;
- for (i = 0; i <= mp->ma_mask; i++) {
- dictentry *ep = mp->ma_table + i;
- PyObject *pvalue = ep->me_value;
- if (pvalue != NULL) {
- /* Prevent PyObject_Repr from deleting value during
- key format */
- Py_INCREF(pvalue);
- if (any++ > 0)
- fprintf(fp, ", ");
- if (PyObject_Print((PyObject *)ep->me_key, fp, 0)!=0) {
- Py_DECREF(pvalue);
- Py_ReprLeave((PyObject*)mp);
- return -1;
- }
- fprintf(fp, ": ");
- if (PyObject_Print(pvalue, fp, 0) != 0) {
- Py_DECREF(pvalue);
- Py_ReprLeave((PyObject*)mp);
- return -1;
- }
- Py_DECREF(pvalue);
- }
- }
- fprintf(fp, "}");
- Py_ReprLeave((PyObject*)mp);
- return 0;
-}
-
static PyObject *
dict_repr(dictobject *mp)
{
@@ -1974,7 +1929,7 @@ PyTypeObject PyDict_Type = {
sizeof(dictobject),
0,
(destructor)dict_dealloc, /* tp_dealloc */
- (printfunc)dict_print, /* tp_print */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */