summaryrefslogtreecommitdiffstats
path: root/Doc/tools/anno-api.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/anno-api.py')
-rwxr-xr-xDoc/tools/anno-api.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/tools/anno-api.py b/Doc/tools/anno-api.py
index 33f85fb..eddb3eb 100755
--- a/Doc/tools/anno-api.py
+++ b/Doc/tools/anno-api.py
@@ -49,7 +49,11 @@ def main():
sys.stderr.write("No refcount data for %s\n" % s)
else:
if info.result_type == "PyObject*":
- rc = info.result_refs and "New" or "Borrowed"
+ if info.result_refs is None:
+ rc = "Always \NULL{}"
+ else:
+ rc = info.result_refs and "New" or "Borrowed"
+ rc = rc + " reference"
line = r"\begin{cfuncdesc}[%s]{PyObject*}{" % rc \
+ line[prefix_len:]
output.write(line)