]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fixed bugs in generic_setattr (returned NULL instead of
authorGuido van Rossum <guido@python.org>
Wed, 3 Jun 1992 17:07:49 +0000 (17:07 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 3 Jun 1992 17:07:49 +0000 (17:07 +0000)
  -1 for errors)

Modules/flmodule.c

index 2d26533f1f09a9927750ca6ef0074bc98f0ba108..d8c423c820f2204548e51b6301d427dafc576734 100644 (file)
@@ -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;