Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dd8c98

Browse files
committed
fixed bugs in generic_setattr (returned NULL instead of
-1 for errors)
1 parent 0002395 commit 3dd8c98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/flmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ generic_setattr(g, name, v)
325325

326326
if (v == NULL) {
327327
err_setstr(TypeError, "can't delete forms object attributes");
328-
return NULL;
328+
return -1;
329329
}
330330

331331
/* "label" is an exception: setmember doesn't set strings;
332332
and FORMS wants you to call a function to set the label */
333333
if (strcmp(name, "label") == 0) {
334334
if (!is_stringobject(v)) {
335335
err_setstr(TypeError, "label attr must be string");
336-
return NULL;
336+
return -1;
337337
}
338338
fl_set_object_label(g->ob_generic, getstringvalue(v));
339339
return 0;

0 commit comments

Comments
 (0)