diff options
Diffstat (limited to 'Objects/fileobject.c')
| -rw-r--r-- | Objects/fileobject.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index b168ccfabb..143f6971d7 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -117,17 +117,20 @@ file_dealloc(f) free((char *)f); } -static void +static int file_print(f, fp, flags) fileobject *f; FILE *fp; int flags; { fprintf(fp, "<%s file ", f->f_fp == NULL ? "closed" : "open"); - printobject(f->f_name, fp, flags); + if (printobject(f->f_name, fp, flags) != 0) + return -1; fprintf(fp, ", mode "); - printobject(f->f_mode, fp, flags); + if (printobject(f->f_mode, fp, flags) != 0) + return -1; fprintf(fp, ">"); + return 0; } static object * |
