diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 128506a9eed..bfb40e5c539 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -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 }, }; diff --git a/Modules/_struct.c b/Modules/_struct.c index 1f8f9c44dd6..ff1bf4e96c5 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -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 */ }; diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 7cbc49f9699..329581c8692 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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} }; diff --git a/Objects/typevarobject.c b/Objects/typevarobject.c index 3adae3e14c9..0f04523b003 100644 --- a/Objects/typevarobject.c +++ b/Objects/typevarobject.c @@ -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}, }; diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 347945a4c45..3493ab3f240 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -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} };