summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-06-03 17:07:49 (GMT)
committerGuido van Rossum <guido@python.org>1992-06-03 17:07:49 (GMT)
commit3dd8c9895ec5ffca4c8a2288b54dc209068cb434 (patch)
tree566dbdcca786649b995453b1859f9fc0e69d3fbf /Modules
parent000239517d0a0904d82e66e8a21c56212c0646d1 (diff)
downloadcpython-3dd8c9895ec5ffca4c8a2288b54dc209068cb434.zip
cpython-3dd8c9895ec5ffca4c8a2288b54dc209068cb434.tar.gz
cpython-3dd8c9895ec5ffca4c8a2288b54dc209068cb434.tar.bz2
fixed bugs in generic_setattr (returned NULL instead of
-1 for errors)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/flmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/flmodule.c b/Modules/flmodule.c
index 2d26533..d8c423c 100644
--- a/Modules/flmodule.c
+++ b/Modules/flmodule.c
@@ -325,7 +325,7 @@ generic_setattr(g, name, v)
if (v == NULL) {
err_setstr(TypeError, "can't delete forms object attributes");
- return NULL;
+ return -1;
}
/* "label" is an exception: setmember doesn't set strings;
@@ -333,7 +333,7 @@ generic_setattr(g, name, v)
if (strcmp(name, "label") == 0) {
if (!is_stringobject(v)) {
err_setstr(TypeError, "label attr must be string");
- return NULL;
+ return -1;
}
fl_set_object_label(g->ob_generic, getstringvalue(v));
return 0;