]> granicus.if.org Git - python/commitdiff
Correct typo in setattr: return -1 for error, not NULL
authorGuido van Rossum <guido@python.org>
Wed, 11 Sep 1996 22:51:25 +0000 (22:51 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 11 Sep 1996 22:51:25 +0000 (22:51 +0000)
Objects/object.c

index 9c99ea2d19ed6e148f4c5e54afdcbdcec910df3d..b1025ef88be54f7138c1218b12d34400dffd4495 100644 (file)
@@ -370,7 +370,7 @@ setattr(v, name, w)
                int res;
                s = newstringobject(name);
                if (s == NULL)
-                       return NULL;
+                       return -1;
                res = (*v->ob_type->tp_setattro)(v, s, w);
                XDECREF(s);
                return res;