From: Jeremy Hylton Date: Tue, 18 Feb 2003 17:02:15 +0000 (+0000) Subject: Make __module__ settable on functions and methods. X-Git-Tag: v2.3c1~1797 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff71c98449c7fd2499d51474dbf690eb7f98dabf;p=python Make __module__ settable on functions and methods. --- diff --git a/Objects/funcobject.c b/Objects/funcobject.c index b162fdf20a..fa241312c2 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -159,7 +159,7 @@ static PyMemberDef func_memberlist[] = { RESTRICTED|READONLY}, {"func_name", T_OBJECT, OFF(func_name), READONLY}, {"__name__", T_OBJECT, OFF(func_name), READONLY}, - {"__module__", T_OBJECT, OFF(func_module), READONLY}, + {"__module__", T_OBJECT, OFF(func_module)}, {NULL} /* Sentinel */ }; diff --git a/Objects/methodobject.c b/Objects/methodobject.c index aa64ff19fb..5e967d3f3d 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), READONLY}, + {"__module__", T_OBJECT, OFF(m_module)}, {NULL} };