[Python-bugs-list] [ python-Bugs-429554 ] PyList_SET_ITEM documentation omission

noreply@sourceforge.net noreply@sourceforge.net
Sat, 02 Jun 2001 20:17:27 -0700


Bugs item #429554, was updated on 2001-06-02 04:11
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=429554&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Ernst Jan Plugge (rmc)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: PyList_SET_ITEM documentation omission

Initial Comment:
The Python/C API documentation doesn't document the 
fact that PyList_SET_ITEM does not DECREF the list 
item being replaced (if any), but PyList_SetItem does.

from listobject.h:

#define PyList_SET_ITEM(op, i, v) (((PyListObject *)
(op))->ob_item[i] = (v))

from listobject.c:

[...]
olditem = *p;
*p = newitem;
Py_XDECREF(olditem);
[...]



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

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-06-02 20:17

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/api/api.tex revisions 1.126 and 1.117.2.4.

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

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