Skip to content

Commit 2a300e3

Browse files
[3.13] gh-141004: Document the PyDoc_VAR macro (GH-141263) (GH-141265)
gh-141004: Document the `PyDoc_VAR` macro (GH-141263) (cherry picked from commit 5452997) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 10d44f7 commit 2a300e3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Doc/c-api/intro.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ complete listing.
247247

248248
.. c:macro:: PyDoc_STRVAR(name, str)
249249
250-
Creates a variable with name ``name`` that can be used in docstrings.
250+
Creates a variable with name *name* that can be used in docstrings.
251251
If Python is built without docstrings, the value will be empty.
252252

253253
Use :c:macro:`PyDoc_STRVAR` for docstrings to support building
@@ -279,6 +279,15 @@ complete listing.
279279
{NULL, NULL}
280280
};
281281

282+
.. c:macro:: PyDoc_VAR(name)
283+
284+
Declares a static character array variable with the given name *name*.
285+
286+
For example::
287+
288+
PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
289+
"to the tropics and subtropics of the Eastern Hemisphere.");
290+
282291

283292
.. _api-objects:
284293

0 commit comments

Comments
 (0)