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.)
This commit is contained in:
Fred Drake 2000-04-10 18:23:47 +00:00
parent 0a863da1f8
commit 729eca1b9d
1 changed files with 5 additions and 1 deletions

View File

@ -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)