From 3f571d6497f33945da5ea7791fc533df1f995387 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Feb 2001 02:42:56 +0000 Subject: [PATCH] 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. --- Objects/funcobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/funcobject.c b/Objects/funcobject.c index b166d603695..0282242f4de 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)},