diff options
author | Andreas Schneider <asn@samba.org> | 2013-10-14 13:17:12 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-03-15 22:14:08 +0100 |
commit | 2d30bcb5c6dfe9f33cb76c106afcb913f4bdbd59 (patch) | |
tree | 21e963a84ed1665bec0b383f937a3d9665871742 | |
parent | 2c3ca8f15dfbe38389650d4185ac7a9611162869 (diff) | |
download | samba-2d30bcb5c6dfe9f33cb76c106afcb913f4bdbd59.tar.gz |
talloc: Add a warning to talloc_reference() documentation.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 14 23:05:54 CEST 2013 on sn-devel-104
(cherry picked from commit 2343df451a13115eebfd46f9247ec2ae8c3a85c0)
-rw-r--r-- | lib/talloc/talloc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 1b59390e33a..5d29a8d5cf0 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -961,6 +961,10 @@ size_t talloc_reference_count(const void *ptr); * @return The original pointer 'ptr', NULL if talloc ran out of * memory in creating the reference. * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * * Example: * @code * unsigned int *a, *b, *c; @@ -1001,6 +1005,10 @@ void *_talloc_reference_loc(const void *context, const void *ptr, const char *lo * this function will fail and will return -1. Likewise, if ptr is NULL, * then the function will make no modifications and return -1. * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * * Example: * @code * unsigned int *a, *b, *c; |