summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 02:42:56 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 02:42:56 (GMT)
commit3f571d6497f33945da5ea7791fc533df1f995387 (patch)
tree994623c18094672d10f605cdcba96faaab5a482c /Objects
parent280c81a9402dfa39159c3c01dec217b2ad55c8c9 (diff)
downloadcpython-3f571d6497f33945da5ea7791fc533df1f995387.zip
cpython-3f571d6497f33945da5ea7791fc533df1f995387.tar.gz
cpython-3f571d6497f33945da5ea7791fc533df1f995387.tar.bz2
Fix SF buf 404774 submitted by Gregory H. Ball
A user program could delete a function's func_closure, which would cause it to crash when called.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index b166d60..0282242 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -130,7 +130,7 @@ static struct memberlist func_memberlist[] = {
{"func_globals", T_OBJECT, OFF(func_globals), READONLY},
{"func_name", T_OBJECT, OFF(func_name), READONLY},
{"__name__", T_OBJECT, OFF(func_name), READONLY},
- {"func_closure", T_OBJECT, OFF(func_closure)},
+ {"func_closure", T_OBJECT, OFF(func_closure), READONLY},
{"func_defaults", T_OBJECT, OFF(func_defaults)},
{"func_doc", T_OBJECT, OFF(func_doc)},
{"__doc__", T_OBJECT, OFF(func_doc)},