printobject now returns an error code

This commit is contained in:
Guido van Rossum 1991-06-07 16:10:43 +00:00
parent dd0108081b
commit 909336104b
10 changed files with 70 additions and 86 deletions

View file

@ -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 *