]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing `PyDoc_STR` calls (#109393)
authorNikita Sobolev <mail@sobolevn.me>
Fri, 15 Sep 2023 13:10:48 +0000 (16:10 +0300)
committerGitHub <noreply@github.com>
Fri, 15 Sep 2023 13:10:48 +0000 (15:10 +0200)
In files:

* Modules/_ctypes/cfield.c
* Modules/_struct.c
* Objects/dictobject.c
* Objects/typevarobject.c
* Objects/unionobject.c

Modules/_ctypes/cfield.c
Modules/_struct.c
Objects/dictobject.c
Objects/typevarobject.c
Objects/unionobject.c

index 128506a9eed9204822a7e5e36ee1c7d9c63c6f3e..bfb40e5c5393fcb1ce5661b4c33c4d7afea2d02d 100644 (file)
@@ -250,8 +250,8 @@ PyCField_get_size(PyObject *self, void *data)
 }
 
 static PyGetSetDef PyCField_getset[] = {
-    { "offset", PyCField_get_offset, NULL, "offset in bytes of this field" },
-    { "size", PyCField_get_size, NULL, "size in bytes of this field" },
+    { "offset", PyCField_get_offset, NULL, PyDoc_STR("offset in bytes of this field") },
+    { "size", PyCField_get_size, NULL, PyDoc_STR("size in bytes of this field") },
     { NULL, NULL, NULL, NULL },
 };
 
index 1f8f9c44dd69aa2a9ab3780dc8ceacb4134dcfb6..ff1bf4e96c5f214ef2b333a280f0f45f0baf864c 100644 (file)
@@ -2198,8 +2198,8 @@ static PyMemberDef s_members[] = {
 };
 
 static PyGetSetDef s_getsetlist[] = {
-    {"format", (getter)s_get_format, (setter)NULL, "struct format string", NULL},
-    {"size", (getter)s_get_size, (setter)NULL, "struct size in bytes", NULL},
+    {"format", (getter)s_get_format, (setter)NULL, PyDoc_STR("struct format string"), NULL},
+    {"size", (getter)s_get_size, (setter)NULL, PyDoc_STR("struct size in bytes"), NULL},
     {NULL} /* sentinel */
 };
 
index 7cbc49f96994f7cc39f8ce9663eb45e67d325313..329581c8692c4031bef5bc08fb6c20915c510302 100644 (file)
@@ -4643,7 +4643,7 @@ dictview_mapping(PyObject *view, void *Py_UNUSED(ignored)) {
 
 static PyGetSetDef dictview_getset[] = {
     {"mapping", dictview_mapping, (setter)NULL,
-     "dictionary that this view refers to", NULL},
+     PyDoc_STR("dictionary that this view refers to"), NULL},
     {0}
 };
 
index 3adae3e14c9103c2da07fe8b50ea61a209e50d54..0f04523b0032ed2199832515f3de45e4a9b2db9d 100644 (file)
@@ -806,8 +806,8 @@ paramspec_kwargs(PyObject *self, void *unused)
 }
 
 static PyGetSetDef paramspec_getset[] = {
-    {"args", (getter)paramspec_args, NULL, "Represents positional arguments.", NULL},
-    {"kwargs", (getter)paramspec_kwargs, NULL, "Represents keyword arguments.", NULL},
+    {"args", (getter)paramspec_args, NULL, PyDoc_STR("Represents positional arguments."), NULL},
+    {"kwargs", (getter)paramspec_kwargs, NULL, PyDoc_STR("Represents keyword arguments."), NULL},
     {0},
 };
 
index 347945a4c4597237c2b46229502192e36a17c74e..3493ab3f240abc51ae75ee9975f9711b4578e6dd 100644 (file)
@@ -331,7 +331,8 @@ union_parameters(PyObject *self, void *Py_UNUSED(unused))
 }
 
 static PyGetSetDef union_properties[] = {
-    {"__parameters__", union_parameters, (setter)NULL, "Type variables in the types.UnionType.", NULL},
+    {"__parameters__", union_parameters, (setter)NULL,
+     PyDoc_STR("Type variables in the types.UnionType."), NULL},
     {0}
 };