2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 05:02:17 +00:00

Hacks to make PyDoc work, from Nick Rasmussen <nick-at-ilm.com>

[SVN r27613]
This commit is contained in:
Dave Abrahams
2005-03-12 02:49:10 +00:00
parent 91e76a296f
commit c2b5925600

View File

@@ -571,11 +571,17 @@ extern "C"
else
return python::incref(f->name().ptr());
}
static PyObject* function_get_class(PyObject* op, void*)
{
return python::incref(reinterpret_cast<PyObject *>(&PyCFunction_Type));
}
}
static PyGetSetDef function_getsetlist[] = {
{"__name__", (getter)function_get_name, 0 },
{"func_name", (getter)function_get_name, 0 },
{"__class__", (getter)function_get_class, 0 },
{"__doc__", (getter)function_get_doc, (setter)function_set_doc},
{"func_doc", (getter)function_get_doc, (setter)function_set_doc},
{NULL} /* Sentinel */