Author ncoghlan
Recipients ncoghlan
Date 2010-09-03.11:43:40
SpamBayes Score 8.53462e-12
Marked as misclassified No
Message-id <1283514224.53.0.325600320074.issue9755@psf.upfronthosting.co.za>
In-reply-to
Content
As noted in [1] the refcount data for the C API documentation is contained in a separate file at Doc/data/refcounts.dat.

This file is not mentioned in "Documenting Python" and hence has not been correctly updated for Py3k (e.g. none of the PyString methods have been renamed to PyUnicode in that file, so the relevant refcount changes are not documented correctly).

There are several possible improvements to be considered in this area
1. Mention this file and its purpose in "Documenting Python"
2. Update the Sphinx extension to warn if a C API function is not found in this file
3. Update the Sphinx extension to allow this information to be expressed inline in the function definition rather than off in a separate file (if practical)
4. Address Skip's comment from that file by allowing "-0" to indicate stolen references for arguments and "+0" for borrowed references as return values
5. Perhaps add a mechanism to indicate when PyMem_Free needs to be called on a return value or pointer output value.

[1] http://mail.python.org/pipermail/python-dev/2010-September/103429.html
History
Date User Action Args
2010-09-03 11:43:44ncoghlansetrecipients: + ncoghlan
2010-09-03 11:43:44ncoghlansetmessageid: <1283514224.53.0.325600320074.issue9755@psf.upfronthosting.co.za>
2010-09-03 11:43:41ncoghlanlinkissue9755 messages
2010-09-03 11:43:40ncoghlancreate