summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1997-09-05 17:53:53 (GMT)
committerFred Drake <fdrake@acm.org>1997-09-05 17:53:53 (GMT)
commit49bb0e32a03c056a42df5c8d90347db19d3cb2d4 (patch)
tree3f4e5db9189fe17671752bb52167db163ccc2341
parentaee0bad0a50f9f533267d241bea97a0b2118f238 (diff)
downloadcpython-49bb0e32a03c056a42df5c8d90347db19d3cb2d4.zip
cpython-49bb0e32a03c056a42df5c8d90347db19d3cb2d4.tar.gz
cpython-49bb0e32a03c056a42df5c8d90347db19d3cb2d4.tar.bz2
Fix in trailing comment: PyDict_SetItemString() does *not* consume a reference
count, PyList_SetItem() does. Very confusing!
-rw-r--r--Include/object.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Include/object.h b/Include/object.h
index 65e25bc..b3f18d7 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -461,9 +461,8 @@ quickly. Thus, to retrieve an object and store it again, the caller
must call Py_INCREF() explicitly.
NOTE: functions that 'consume' a reference count like
-PyDict_SetItemString() even
-consume the reference if the object wasn't stored, to simplify error
-handling.
+PyList_SetItemString() even consume the reference if the object wasn't
+stored, to simplify error handling.
It seems attractive to make other functions that take an object as
argument consume a reference count; however this may quickly get