commit | 6b29c0147b964e6afa6a09bb8d694bafc30cf7ad | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Feb 18 17:18:35 2003 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Feb 18 17:18:35 2003 +0000 |
tree | 7a387fb4bb9aa37f4e73f7cd53cc1fa0a8b79d4b | |
parent | ff71c98449c7fd2499d51474dbf690eb7f98dabf [diff] [blame] |
Make __module__ writable except in restricted mode (like for classic classes).
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 @@ #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} };