FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-141004: Document the `PyDoc_VAR` macro (GH-141263) by miss-islington · Pull Request #141264 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 10 additions & 1 deletion Doc/c-api/intro.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ complete listing.

.. c:macro:: PyDoc_STRVAR(name, str)

Creates a variable with name ``name`` that can be used in docstrings.
Creates a variable with name *name* that can be used in docstrings.
If Python is built without docstrings, the value will be empty.

Use :c:macro:`PyDoc_STRVAR` for docstrings to support building
Expand Down Expand Up @@ -267,6 +267,15 @@ complete listing.
{NULL, NULL}
};

.. c:macro:: PyDoc_VAR(name)

Declares a static character array variable with the given name *name*.

For example::

PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
"to the tropics and subtropics of the Eastern Hemisphere.");


.. _api-objects:

Expand Down
Loading

Back | FazBrowse Home | New Git URL