summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-09-17 17:54:56 (GMT)
committerGuido van Rossum <guido@python.org>1992-09-17 17:54:56 (GMT)
commit7066dd75c5ee8385135541d03fb8edd8939ad740 (patch)
treee118a32af87a83e295de0985b67da90524203c6a /Objects/classobject.c
parentc2670a000bd69fb689a7b05436ff0091052f4f3c (diff)
downloadcpython-7066dd75c5ee8385135541d03fb8edd8939ad740.zip
cpython-7066dd75c5ee8385135541d03fb8edd8939ad740.tar.gz
cpython-7066dd75c5ee8385135541d03fb8edd8939ad740.tar.bz2
* Makefile: added IMGFILE; moved some stuff around.
* flmodule.c: added some missing functions; changed readonly flags of some data members based upon FORMS documentation. * listobject.c: fixed int/long arg lint bug (bites PC compilers). * several: removed redundant print methods (repr is good enough). * posixmodule.c: added (still experimental) process group functions.
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 9026968..e3b12c6 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -261,30 +261,6 @@ instance_setattr(inst, name, v)
return dictinsert(inst->in_attr, name, v);
}
-int
-instance_print(inst, fp, flags)
- instanceobject *inst;
- FILE *fp;
- int flags;
-{
- object *func, *repr;
- int ret;
-
- func = instance_getattr(inst, "__repr__");
- if (func == NULL) {
- err_clear();
- fprintf(fp, "<instance object at %lx>", (long)inst);
- return 0;
- }
- repr = call_object(func, (object *)NULL);
- DECREF(func);
- if (repr == NULL)
- return -1;
- ret = printobject(repr, fp, flags | PRINT_RAW);
- DECREF(repr);
- return ret;
-}
-
object *
instance_repr(inst)
instanceobject *inst;
@@ -753,7 +729,7 @@ typeobject Instancetype = {
sizeof(instanceobject),
0,
instance_dealloc, /*tp_dealloc*/
- instance_print, /*tp_print*/
+ 0, /*tp_print*/
instance_getattr, /*tp_getattr*/
instance_setattr, /*tp_setattr*/
instance_compare, /*tp_compare*/