summaryrefslogtreecommitdiff
path: root/lib/talloc/pytalloc_guide.txt
AgeCommit message (Collapse)AuthorFilesLines
2023-04-14lib:talloc: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2017-02-25pytalloc: add pytalloc_GenericObject_{steal,reference}[_ex]()Stefan Metzmacher1-6/+67
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-19pytalloc: Add a warning about enable_null_trackingGarming Sam1-0/+2
If it is called in the middle of a script such as samba-tool, memory would be hanging from both the actual NULL context and the talloc_null_context (causing a segfault at system_exit). Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-03-08pytalloc: Correct description of pytalloc_Get{Base,}ObjectType behaviourtalloc-2.1.6Andrew Bartlett1-6/+8
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
2016-03-08pytalloc: Add pytalloc_BaseObject_PyType_Ready() wrapperAndrew Bartlett1-0/+6
This avoids the need for the caller to set tp_base and tp_basicsize and so removes those as possible errors. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08pytalloc: Add new BaseObjectAndrew Bartlett1-4/+22
This new object not only avoids the ABI issues of talloc.Object it stores one more pointer, being the start of the array, and so can be used to fix the PIDL bindings/talloc refcount issue. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2015-05-19pytalloc: Port to Python 3Petr Viktorin1-0/+10
- Use native string for repr - Use rich comparison Removes the deprecated tp_compare in favor of tp_richcompare. Disparate types cannot be compared (except for == and !=), and True or False objects are returned explicitly. - Use Py_TYPE instead of ob_type This changed to conform to C aliasing rules, see http://legacy.python.org/dev/peps/pep-3123/ - Don't provide CObject creation function A PyCapsule based replacement would be possible, but might not be necessary considering the function is not used much. - Use new-style module initialization Build changes: - Use ABI flag in the lib name and pkg-config template - Use the SAMBA_CHECK_PYTHON macro for finding Python Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-11-28Add a basic guide on pytalloc.Jelmer Vernooij1-0/+153
Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Thu Nov 28 02:24:45 CET 2013 on sn-devel-104