https://github.com/python/cpython/commit/f98211852a419ca2038e0de7f830ea9db6b20f23
commit: f98211852a419ca2038e0de7f830ea9db6b20f23
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2025-11-08T18:18:04Z
summary:

[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 545299773b40fb589cbd5e54d1d597207d9a2a76)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/c-api/intro.rst

diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst
index 36bb8d7438a4d7..d6512a9ef2de48 100644
--- a/Doc/c-api/intro.rst
+++ b/Doc/c-api/intro.rst
@@ -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
@@ -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:
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to