]> granicus.if.org Git - python/commitdiff
Fix in trailing comment: PyDict_SetItemString() does *not* consume a reference
authorFred Drake <fdrake@acm.org>
Fri, 5 Sep 1997 17:53:53 +0000 (17:53 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 5 Sep 1997 17:53:53 +0000 (17:53 +0000)
count, PyList_SetItem() does.  Very confusing!

Include/object.h

index 65e25bc7a5d8adcb06cb281ab77fb3abff3f924f..b3f18d7af76f3b6d5a166f8b8b10058a46481ee3 100644 (file)
@@ -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