summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/clinic.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst
index a3c4330..04b1a2c 100644
--- a/Doc/howto/clinic.rst
+++ b/Doc/howto/clinic.rst
@@ -1249,15 +1249,15 @@ The ``defining_class`` converter is not compatible with ``__init__`` and ``__new
methods, which cannot use the ``METH_METHOD`` convention.
It is not possible to use ``defining_class`` with slot methods. In order to
-fetch the module state from such methods, use ``_PyType_GetModuleByDef`` to
-look up the module and then :c:func:`PyModule_GetState` to fetch the module
+fetch the module state from such methods, use :c:func:`PyType_GetModuleByDef`
+to look up the module and then :c:func:`PyModule_GetState` to fetch the module
state. Example from the ``setattro`` slot method in
``Modules/_threadmodule.c``::
static int
local_setattro(localobject *self, PyObject *name, PyObject *v)
{
- PyObject *module = _PyType_GetModuleByDef(Py_TYPE(self), &thread_module);
+ PyObject *module = PyType_GetModuleByDef(Py_TYPE(self), &thread_module);
thread_module_state *state = get_thread_state(module);
...
}