Mercurial > cpython-lru_cache-weakref
diff Objects/methodobject.c @ 27941:14451dd3acb0 legacy-trunk
Make __module__ writable except in restricted mode (like for classic classes).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 18 Feb 2003 17:18:35 +0000 |
| parents | 1bd485717564 |
| children | e4fb6164158c |
line wrap: on
line diff
--- a/Objects/methodobject.c Tue Feb 18 17:02:15 2003 +0000 +++ b/Objects/methodobject.c Tue Feb 18 17:18:35 2003 +0000 @@ -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} };
