summaryrefslogtreecommitdiffstats
path: root/Objects/methodobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-18 17:18:35 (GMT)
committerGuido van Rossum <guido@python.org>2003-02-18 17:18:35 (GMT)
commit6b29c0147b964e6afa6a09bb8d694bafc30cf7ad (patch)
tree7a387fb4bb9aa37f4e73f7cd53cc1fa0a8b79d4b /Objects/methodobject.c
parentff71c98449c7fd2499d51474dbf690eb7f98dabf (diff)
downloadcpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.zip
cpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.tar.gz
cpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.tar.bz2
Make __module__ writable except in restricted mode (like for classic classes).
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r--Objects/methodobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 5e967d3..3a92fa4 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -189,7 +189,7 @@ static PyGetSetDef meth_getsets [] = {
#define OFF(x) offsetof(PyCFunctionObject, x)
static PyMemberDef meth_members[] = {
- {"__module__", T_OBJECT, OFF(m_module)},
+ {"__module__", T_OBJECT, OFF(m_module), WRITE_RESTRICTED},
{NULL}
};