diff options
author | Fred Drake <fdrake@acm.org> | 2000-04-10 18:23:47 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-04-10 18:23:47 (GMT) |
commit | 729eca1b9d6a18665da8f0f8d89c4f1ed972f371 (patch) | |
tree | b21c7ea62bb67641d1b2ab35d7e69f86614abbb5 /Doc/tools | |
parent | 0a863da1f86deda8ca029c82ccd4aa5e12153721 (diff) | |
download | cpython-729eca1b9d6a18665da8f0f8d89c4f1ed972f371.zip cpython-729eca1b9d6a18665da8f0f8d89c4f1ed972f371.tar.gz cpython-729eca1b9d6a18665da8f0f8d89c4f1ed972f371.tar.bz2 |
For functions which return a PyObject* but use "null" for the
reference count field, state that the return value is always NULL.
(Useful for some PyErr_*() flavors.)
Diffstat (limited to 'Doc/tools')
-rwxr-xr-x | Doc/tools/anno-api.py | 6 |
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) |