Kaydet (Commit) ff71c984 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

Make __module__ settable on functions and methods.

üst e2052ab8
......@@ -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 */
};
......
......@@ -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}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment