diff options
author | Guido van Rossum <guido@python.org> | 1991-06-07 22:59:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-06-07 22:59:30 (GMT) |
commit | 49e85146e2e936120cee4fe415fef53cf518c717 (patch) | |
tree | 9913116e39a555f0dd9eb7c1d341c9434b733187 /Objects | |
parent | bcaa31c4111aa098d70564d2c2dc667cf3bec3db (diff) | |
download | cpython-49e85146e2e936120cee4fe415fef53cf518c717.zip cpython-49e85146e2e936120cee4fe415fef53cf518c717.tar.gz cpython-49e85146e2e936120cee4fe415fef53cf518c717.tar.bz2 |
printobject now returns an error code
Remove superfluous err_nomem() call
,
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/tupleobject.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index de242b1..bce7fdf 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -116,7 +116,7 @@ tupledealloc(op) free((ANY *)op); } -static void +static int tupleprint(op, fp, flags) tupleobject *op; FILE *fp; @@ -124,15 +124,16 @@ tupleprint(op, fp, flags) { int i; fprintf(fp, "("); - for (i = 0; i < op->ob_size && !StopPrint; i++) { - if (i > 0) { + for (i = 0; i < op->ob_size; i++) { + if (i > 0) fprintf(fp, ", "); - } - printobject(op->ob_item[i], fp, flags); + if (printobject(op->ob_item[i], fp, flags) != 0) + return -1; } if (op->ob_size == 1) fprintf(fp, ","); fprintf(fp, ")"); + return 0; } object * @@ -243,7 +244,7 @@ tupleconcat(a, bb) size = a->ob_size + b->ob_size; np = (tupleobject *) newtupleobject(size); if (np == NULL) { - return err_nomem(); + return NULL; } for (i = 0; i < a->ob_size; i++) { object *v = a->ob_item[i]; |