Make __module__ settable on functions and methods.

This commit is contained in:
Jeremy Hylton 2003-02-18 17:02:15 +00:00
parent e2052ab82a
commit ff71c98449
2 changed files with 2 additions and 2 deletions

View File

@ -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 */
};

View File

@ -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}
};