From: Fred Drake Date: Mon, 10 Apr 2000 18:23:47 +0000 (+0000) Subject: For functions which return a PyObject* but use "null" for the X-Git-Tag: v1.6a2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=729eca1b9d6a18665da8f0f8d89c4f1ed972f371;p=python 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.) --- diff --git a/Doc/tools/anno-api.py b/Doc/tools/anno-api.py index 33f85fba92..eddb3eb796 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)