diff options
author | Oleg Iarygin <oleg@arhadthedev.net> | 2022-04-19 19:58:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 19:58:34 (GMT) |
commit | 312e16fb7be927521b453f427a28535f772a771c (patch) | |
tree | 53df6d613723dffa010efd678ee7f8310e8d558c /Doc/c-api | |
parent | cb3c85d40d2dfc1d518ebd7afd3d82819e38a390 (diff) | |
download | cpython-312e16fb7be927521b453f427a28535f772a771c.zip cpython-312e16fb7be927521b453f427a28535f772a771c.tar.gz cpython-312e16fb7be927521b453f427a28535f772a771c.tar.bz2 |
[3.9] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91664)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec664c645ab744658d7e941d72e1a398)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/typeobj.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index d58a53b..d49f3ff 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -2482,7 +2482,7 @@ A basic static type:: PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "mymod.MyObject", .tp_basicsize = sizeof(MyObject), - .tp_doc = "My objects", + .tp_doc = PyDoc_STR("My objects"), .tp_new = myobj_new, .tp_dealloc = (destructor)myobj_dealloc, .tp_repr = (reprfunc)myobj_repr, @@ -2512,7 +2512,7 @@ with a more verbose initializer:: 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ - "My objects", /* tp_doc */ + PyDoc_STR("My objects"), /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -2545,7 +2545,7 @@ A type that supports weakrefs, instance dicts, and hashing:: PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "mymod.MyObject", .tp_basicsize = sizeof(MyObject), - .tp_doc = "My objects", + .tp_doc = PyDoc_STR("My objects"), .tp_weaklistoffset = offsetof(MyObject, weakreflist), .tp_dictoffset = offsetof(MyObject, inst_dict), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, @@ -2572,7 +2572,7 @@ to create instances (e.g. uses a separate factory func):: .tp_name = "mymod.MyStr", .tp_basicsize = sizeof(MyStr), .tp_base = NULL, // set to &PyUnicode_Type in module init - .tp_doc = "my custom str", + .tp_doc = PyDoc_STR("my custom str"), .tp_flags = Py_TPFLAGS_DEFAULT, .tp_new = NULL, .tp_repr = (reprfunc)myobj_repr, |