diff options
author | Guido van Rossum <guido@python.org> | 1991-06-07 16:10:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-06-07 16:10:43 (GMT) |
commit | 909336104b70cae29c0c4fde4477d508e1d709ac (patch) | |
tree | 565a1a5a3aea78eeca3216ab2d95bc74b73286a1 /Objects/longobject.c | |
parent | dd0108081b1a4b44d712477308b9764139ebc6a2 (diff) | |
download | cpython-909336104b70cae29c0c4fde4477d508e1d709ac.zip cpython-909336104b70cae29c0c4fde4477d508e1d709ac.tar.gz cpython-909336104b70cae29c0c4fde4477d508e1d709ac.tar.bz2 |
printobject now returns an error code
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index de7ff39..ca4088c 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -533,21 +533,18 @@ long_dealloc(v) DEL(v); } -static void +static int long_print(v, fp, flags) longobject *v; FILE *fp; int flags; { stringobject *str = long_format(v, 10); - if (str == NULL) { - err_clear(); - fprintf(fp, "[err]"); - } - else { - fprintf(fp, "%sL", GETSTRINGVALUE(str)); - DECREF(str); - } + if (str == NULL) + return -1; + fprintf(fp, "%sL", GETSTRINGVALUE(str)); + DECREF(str); + return 0; } static object * |