From: Benjamin Peterson Date: Thu, 17 Apr 2014 22:29:01 +0000 (-0400) Subject: fix ref count annotations on sphinx >= 1.2.1 (closes #21286) X-Git-Tag: v3.4.1rc1~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d065c489910e86fb8ed7219205da65e224f03d94;p=thirdparty%2FPython%2Fcpython.git fix ref count annotations on sphinx >= 1.2.1 (closes #21286) --- diff --git a/Doc/tools/sphinxext/c_annotations.py b/Doc/tools/sphinxext/c_annotations.py index 8b5167ac906e..cf9ad9e7aca3 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*"):