summaryrefslogtreecommitdiffstats
path: root/Python/structmember.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/structmember.c')
-rw-r--r--Python/structmember.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Python/structmember.c b/Python/structmember.c
index 6b29c30..784bbf5 100644
--- a/Python/structmember.c
+++ b/Python/structmember.c
@@ -1,5 +1,5 @@
/***********************************************************
-Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
All Rights Reserved
@@ -144,6 +144,11 @@ setmember(addr, mlist, name, v)
err_setstr(TypeError, "readonly attribute");
return -1;
}
+ if (v == NULL && l->type != T_OBJECT) {
+ err_setstr(TypeError,
+ "can't delete numeric/char attribute");
+ return -1;
+ }
addr += l->offset;
switch (l->type) {
case T_BYTE: