mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
fix ref count annotations on sphinx >= 1.2.1 (closes #21286)
This commit is contained in:
parent
1a4f561d7c
commit
d065c48991
1 changed files with 4 additions and 1 deletions
|
@ -81,7 +81,10 @@ class Annotations(dict):
|
||||||
continue
|
continue
|
||||||
if not par[0].has_key('names') or not par[0]['names']:
|
if not par[0].has_key('names') or not par[0]['names']:
|
||||||
continue
|
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:
|
if not entry:
|
||||||
continue
|
continue
|
||||||
elif entry.result_type not in ("PyObject*", "PyVarObject*"):
|
elif entry.result_type not in ("PyObject*", "PyVarObject*"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue