summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.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/fileobject.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/fileobject.c')
-rw-r--r--Objects/fileobject.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index e649792..dd47905 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -132,29 +132,11 @@ file_dealloc(f)
free((char *)f);
}
-static int
-file_print(f, fp, flags)
- fileobject *f;
- FILE *fp;
- int flags;
-{
- fprintf(fp, "<%s file ", f->f_fp == NULL ? "closed" : "open");
- if (printobject(f->f_name, fp, flags) != 0)
- return -1;
- fprintf(fp, ", mode ");
- if (printobject(f->f_mode, fp, flags) != 0)
- return -1;
- fprintf(fp, ">");
- return 0;
-}
-
static object *
file_repr(f)
fileobject *f;
{
char buf[300];
- /* XXX This differs from file_print if the filename contains
- quotes or other funny characters. */
sprintf(buf, "<%s file '%.256s', mode '%.10s'>",
f->f_fp == NULL ? "closed" : "open",
getstringvalue(f->f_name),
@@ -535,7 +517,7 @@ typeobject Filetype = {
sizeof(fileobject),
0,
file_dealloc, /*tp_dealloc*/
- file_print, /*tp_print*/
+ 0, /*tp_print*/
file_getattr, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/