[Python-checkins] cpython (3.4): fix ref count annotations on sphinx >= 1.2.1 (closes #21286)

benjamin.peterson python-checkins at python.org
Fri Apr 18 00:29:35 CEST 2014


http://hg.python.org/cpython/rev/8c12d3e0f1de
changeset:   90389:8c12d3e0f1de
branch:      3.4
parent:      90387:635817da596d
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Apr 17 18:29:01 2014 -0400
summary:
  fix ref count annotations on sphinx >= 1.2.1 (closes #21286)

files:
  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
--- a/Doc/tools/sphinxext/c_annotations.py
+++ b/Doc/tools/sphinxext/c_annotations.py
@@ -81,7 +81,10 @@
                 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*"):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list