diff options
author | Guido van Rossum <guido@python.org> | 1994-08-30 08:27:36 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-30 08:27:36 +0000 |
commit | 1d5735e84621a7fe68d361fa0e289fa2c3310836 (patch) | |
tree | 4ee6f32fa4743f4c6641b04131e449bc71a5ea25 /Python/structmember.c | |
parent | 013142a95fd63a05d09cec7b36b7c86cc98e30c1 (diff) | |
download | cpython-git-1d5735e84621a7fe68d361fa0e289fa2c3310836.tar.gz |
Merge back to main trunk
Diffstat (limited to 'Python/structmember.c')
-rw-r--r-- | Python/structmember.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Python/structmember.c b/Python/structmember.c index 6b29c30e7d..784bbf5b49 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: |