Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df13b9f commit 0b25053Copy full SHA for 0b25053
1 file changed
Doc/tools/anno-api.py
@@ -10,7 +10,7 @@
10
import refcounts
11
12
13
-PREFIX = r"\begin{cfuncdesc}{PyObject*}{"
+PREFIX = r"\begin{cfuncdesc}{Py(Var|)Object*}{"
14
15
16
def main():
@@ -48,14 +48,15 @@ def main():
48
except KeyError:
49
sys.stderr.write("No refcount data for %s\n" % s)
50
else:
51
- if info.result_type == "PyObject*":
+ if info.result_type in ("PyObject*", "PyVarObject*"):
52
if info.result_refs is None:
53
rc = "Always \NULL{}"
54
55
rc = info.result_refs and "New" or "Borrowed"
56
rc = rc + " reference"
57
- line = r"\begin{cfuncdesc}[%s]{PyObject*}{" % rc \
58
- + line[prefix_len:]
+ line = (r"\begin{cfuncdesc}[%s]{%s}{"
+ % (rc, info.result_type)) \
59
+ + line[prefix_len:]
60
output.write(line)
61
if infile != "-":
62
input.close()
0 commit comments