Skip to content

Commit f982118

Browse files
[3.14] gh-141004: Document the PyDoc_VAR macro (GH-141263) (GH-141264)
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 ba0b821 commit f982118

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
@@ -235,7 +235,7 @@ complete listing.
235235

236236
.. c:macro:: PyDoc_STRVAR(name, str)
237237
238-
Creates a variable with name ``name`` that can be used in docstrings.
238+
Creates a variable with name *name* that can be used in docstrings.
239239
If Python is built without docstrings, the value will be empty.
240240

241241
Use :c:macro:`PyDoc_STRVAR` for docstrings to support building
@@ -267,6 +267,15 @@ complete listing.
267267
{NULL, NULL}
268268
};
269269

270+
.. c:macro:: PyDoc_VAR(name)
271+
272+
Declares a static character array variable with the given name *name*.
273+
274+
For example::
275+
276+
PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
277+
"to the tropics and subtropics of the Eastern Hemisphere.");
278+
270279

271280
.. _api-objects:
272281

0 commit comments

Comments
 (0)