diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-04-17 22:29:01 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-04-17 22:29:01 (GMT) |
commit | d065c489910e86fb8ed7219205da65e224f03d94 (patch) | |
tree | 92eab9400c06ee03c1da3fe9753464793564cad1 | |
parent | 1a4f561d7c7d28d82e80d7a1c2e4402f081f6f79 (diff) | |
download | cpython-d065c489910e86fb8ed7219205da65e224f03d94.zip cpython-d065c489910e86fb8ed7219205da65e224f03d94.tar.gz cpython-d065c489910e86fb8ed7219205da65e224f03d94.tar.bz2 |
fix ref count annotations on sphinx >= 1.2.1 (closes #21286)
-rw-r--r-- | Doc/tools/sphinxext/c_annotations.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/tools/sphinxext/c_annotations.py b/Doc/tools/sphinxext/c_annotations.py index 8b5167a..cf9ad9e 100644 --- a/Doc/tools/sphinxext/c_annotations.py +++ b/Doc/tools/sphinxext/c_annotations.py @@ -81,7 +81,10 @@ class Annotations(dict): continue if not par[0].has_key('names') or not par[0]['names']: continue - entry = self.get(par[0]['names'][0]) + name = par[0]['names'][0] + if name.startswith("c."): + name = name[2:] + entry = self.get(name) if not entry: continue elif entry.result_type not in ("PyObject*", "PyVarObject*"): |