diff options
author | Guido van Rossum <guido@python.org> | 1991-06-07 22:58:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-06-07 22:58:57 (GMT) |
commit | bcaa31c4111aa098d70564d2c2dc667cf3bec3db (patch) | |
tree | b4b66d83011f27dbc7c4b0dbe0750cbe2754c69a /Objects/stringobject.c | |
parent | 76085b95b9246d56ffcfa10b61f50bbd8da28f9c (diff) | |
download | cpython-bcaa31c4111aa098d70564d2c2dc667cf3bec3db.zip cpython-bcaa31c4111aa098d70564d2c2dc667cf3bec3db.tar.gz cpython-bcaa31c4111aa098d70564d2c2dc667cf3bec3db.tar.bz2 |
printobject now returns an error code
Remove superfluous err_nomem() call
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index f50f403..16884d3 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -84,7 +84,7 @@ getstringvalue(op) /* Methods */ -static void +static int stringprint(op, fp, flags) stringobject *op; FILE *fp; @@ -92,9 +92,10 @@ stringprint(op, fp, flags) { int i; char c; + /* XXX Ought to check for interrupts when writing long strings */ if (flags & PRINT_RAW) { fwrite(op->ob_sval, 1, (int) op->ob_size, fp); - return; + return 0; } fprintf(fp, "'"); for (i = 0; i < op->ob_size; i++) { @@ -107,6 +108,7 @@ stringprint(op, fp, flags) putc(c, fp); } fprintf(fp, "'"); + return 0; } static object * @@ -117,7 +119,7 @@ stringrepr(op) int newsize = 2 + 4 * op->ob_size * sizeof(char); object *v = newsizedstringobject((char *)NULL, newsize); if (v == NULL) { - return err_nomem(); + return NULL; } else { register int i; |