mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
printobject now returns an error code
This commit is contained in:
parent
dd0108081b
commit
909336104b
10 changed files with 70 additions and 86 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue