[Python-checkins] CVS: python/dist/src/Doc/tools anno-api.py,1.1,1.2

Fred Drake python-dev@python.org
2000年4月10日 14:23:50 -0400


Update of /projects/cvsroot/python/dist/src/Doc/tools
In directory seahag.cnri.reston.va.us:/home/fdrake/projects/python/Doc/tools
Modified Files:
	anno-api.py 
Log Message:
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.)
Index: anno-api.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/tools/anno-api.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** anno-api.py	2000年03月15日 14:57:59	1.1
--- anno-api.py	2000年04月10日 18:23:47	1.2
***************
*** 1,5 ****
 #! /usr/bin/env python
 """Add reference count annotations to the Python/C API Reference."""
! __version__ = '$Revision: 1.1 $'
 
 import getopt
--- 1,5 ----
 #! /usr/bin/env python
 """Add reference count annotations to the Python/C API Reference."""
! __version__ = '$Revision: 1.2 $'
 
 import getopt
***************
*** 50,54 ****
 else:
 if info.result_type == "PyObject*":
! rc = info.result_refs and "New" or "Borrowed"
 line = r"\begin{cfuncdesc}[%s]{PyObject*}{" % rc \
 + line[prefix_len:]
--- 50,58 ----
 else:
 if info.result_type == "PyObject*":
! 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:]

AltStyle によって変換されたページ (->オリジナル) /