pytalloc: Correct description of pytalloc_Get{Base,}ObjectType behaviour talloc-2.1.6
authorAndrew Bartlett <abartlet@samba.org>
Tue, 8 Mar 2016 00:46:16 +0000 (13:46 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Mar 2016 04:14:15 +0000 (05:14 +0100)
Thanks to Jelmer for spotting the static variable that causes this odd behaviour

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar  8 05:14:15 CET 2016 on sn-devel-144

lib/talloc/pytalloc_guide.txt

index 8e9694e0177d3680cc5b3aafce597bdc2226682b..1aa4f9944790ac5d1285655c124f86a469a63471 100644 (file)
@@ -60,16 +60,18 @@ in the way needed by PIDL.
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 PyTypeObject *pytalloc_GetObjectType(void)
 
-Obtain a reference to the PyTypeObject for `pytalloc_Object`. The reference
-counter for the object will be incremented, so the caller will have to
-decrement it when it no longer needs it (using `Py_DECREF`).
+Obtain a pointer to the PyTypeObject for `pytalloc_Object`. The
+reference counter for the object will be NOT incremented, so the
+caller MUST NOT decrement it when it no longer needs it (eg by using
+`Py_DECREF`).
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 PyTypeObject *pytalloc_GetBaseObjectType(void)
 
-Obtain a reference to the PyTypeObject for `pytalloc_Object`. The reference
-counter for the object will be incremented, so the caller will have to
-decrement it when it no longer needs it (using `Py_DECREF`).
+Obtain a pointer to the PyTypeObject for `pytalloc_BaseObject`. The
+reference counter for the object will be NOT incremented, so the
+caller MUST NOT decrement it when it no longer needs it (eg by using
+`Py_DECREF`).
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 int pytalloc_BaseObject_PyType_Ready(PyTypeObject *type);