[Python-checkins] CVS: python/dist/src/Doc/tools anno-api.py,1.2,1.3
Fred L. Drake
python-dev@python.org
Tue, 12 Sep 2000 13:47:32 -0700
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17655/tools
Modified Files:
anno-api.py
Log Message:
Make this script handle PyVarObject* functions as well as PyObject*
functions.
Index: anno-api.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/anno-api.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** anno-api.py 2000/04/10 18:23:47 1.2
--- anno-api.py 2000/09/12 20:47:29 1.3
***************
*** 11,15 ****
! PREFIX = r"\begin{cfuncdesc}{PyObject*}{"
--- 11,15 ----
! PREFIX = r"\begin{cfuncdesc}{Py(Var|)Object*}{"
***************
*** 49,53 ****
sys.stderr.write("No refcount data for %s\n" % s)
else:
! if info.result_type == "PyObject*":
if info.result_refs is None:
rc = "Always \NULL{}"
--- 49,53 ----
sys.stderr.write("No refcount data for %s\n" % s)
else:
! if info.result_type in ("PyObject*", "PyVarObject*"):
if info.result_refs is None:
rc = "Always \NULL{}"
***************
*** 55,60 ****
rc = info.result_refs and "New" or "Borrowed"
rc = rc + " reference"
! line = r"\begin{cfuncdesc}[%s]{PyObject*}{" % rc \
! + line[prefix_len:]
output.write(line)
if infile != "-":
--- 55,61 ----
rc = info.result_refs and "New" or "Borrowed"
rc = rc + " reference"
! line = (r"\begin{cfuncdesc}[%s]{%s}{"
! % (rc, info.result_type)) \
! + line[prefix_len:]
output.write(line)
if infile != "-":