]> granicus.if.org Git - python/commitdiff
fix ref count annotations on sphinx >= 1.2.1 (closes #21286)
authorBenjamin Peterson <benjamin@python.org>
Thu, 17 Apr 2014 22:29:01 +0000 (18:29 -0400)
committerBenjamin Peterson <benjamin@python.org>
Thu, 17 Apr 2014 22:29:01 +0000 (18:29 -0400)
Doc/tools/sphinxext/c_annotations.py

index 8b5167ac906ea68b44d0e19d632afe1ed6683e72..cf9ad9e7aca37062a23f5e3c6b05c2ab79e73e00 100644 (file)
@@ -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*"):