[Python-bugs-list] [ python-Bugs-539081 ] PyObject_AsReadBuffer doc error

noreply@sourceforge.net noreply@sourceforge.net
Wed, 03 Apr 2002 20:23:00 -0800


Bugs item #539081, was opened at 2002-04-03 22:53
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=539081&group_id=5470

Category: Documentation
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Kevin Cazabon (madcow42)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: PyObject_AsReadBuffer doc error

Initial Comment:
The documentation for PyObject_AsReadBuffer (and 
others in that group, I suspect) seems to be incorrect.

It notes that PyObject_AsReadBuffer returns 1 on 
success, 0 on failure.  However, it returns 0 on 
success and -1 on failure.  

This is true for the current documentation on 
Python.org, as well as older versions.

Thanks!

(or, this could be treated as a bug in 
PyObject_AsReadBuffer itself, returning the wrong 
values... which is probably more accurate, so it is 
consistent with other functions in the C API.  
However, changing it's return value at this point 
would break a LOT of software)

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-04-03 23:23

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/api/abstract.tex revisions 1.11 and 1.8.6.3. 
Added the relevant PyObject_As*Buffer() descriptions to
Doc/api/api.tex revision 1.117.2.13 (for Python 2.1.3) as
well, since I'm making changes for these functions anyway.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=539081&group_id=5470