File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,10 @@ complete listing.
177177.. c :macro :: PyDoc_STRVAR(name, str)
178178
179179 Creates a variable with name ``name `` that can be used in docstrings.
180+ If Python is built without docstrings, the value will be empty.
180181
181- Use the :c:macro: `PyDoc_STRVAR ` or :c:macro: `PyDoc_STR ` macros for
182- docstrings to support building Python without docstrings,
183- as specified in :pep: `7 `.
182+ Use :c:macro: `PyDoc_STRVAR ` for docstrings to support building
183+ Python without docstrings, as specified in :pep: `7 `.
184184
185185 Example::
186186
@@ -192,6 +192,22 @@ complete listing.
192192 // ...
193193 }
194194
195+ .. c :macro :: PyDoc_STR(str)
196+
197+ Creates a docstring for the given input string or an empty string
198+ if docstrings are disabled.
199+
200+ Use :c:macro: `PyDoc_STR ` in specifying docstrings to support
201+ building Python without docstrings, as specified in :pep: `7 `.
202+
203+ Example::
204+
205+ static PyMethodDef pysqlite_row_methods[] = {
206+ {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS,
207+ PyDoc_STR("Returns the keys of the row.")},
208+ {NULL, NULL}
209+ };
210+
195211.. _api-objects :
196212
197213Objects, Types and Reference Counts
You can’t perform that action at this time.
0 commit comments