summaryrefslogtreecommitdiffstats
path: root/Doc/extending
diff options
context:
space:
mode:
authorOleg Iarygin <oleg@arhadthedev.net>2022-04-18 03:39:32 (GMT)
committerGitHub <noreply@github.com>2022-04-18 03:39:32 (GMT)
commita573cb2fec664c645ab744658d7e941d72e1a398 (patch)
treea44303e326da2ea7406397c6640cf0d51ab3eb43 /Doc/extending
parent328dbc051f84bd5fdf61101bb4fa61d85f8b7feb (diff)
downloadcpython-a573cb2fec664c645ab744658d7e941d72e1a398.zip
cpython-a573cb2fec664c645ab744658d7e941d72e1a398.tar.gz
cpython-a573cb2fec664c645ab744658d7e941d72e1a398.tar.bz2
gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)
Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/newtypes_tutorial.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/extending/newtypes_tutorial.rst b/Doc/extending/newtypes_tutorial.rst
index 9049153..34c25d1 100644
--- a/Doc/extending/newtypes_tutorial.rst
+++ b/Doc/extending/newtypes_tutorial.rst
@@ -90,7 +90,7 @@ The second bit is the definition of the type object. ::
static PyTypeObject CustomType = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "custom.Custom",
- .tp_doc = "Custom objects",
+ .tp_doc = PyDoc_STR("Custom objects"),
.tp_basicsize = sizeof(CustomObject),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
@@ -161,7 +161,7 @@ you will need to OR the corresponding flags.
We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. ::
- .tp_doc = "Custom objects",
+ .tp_doc = PyDoc_STR("Custom objects"),
To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new`
handler. This is the equivalent of the Python method :meth:`__new__`, but