1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

86 Commits

Author SHA1 Message Date
Andrew Tridgell
7fed22eb0a talloc: fixed doc typo 2010-02-08 11:04:59 +11:00
Andreas Schneider
da0e396deb Move the talloc details to the mainpage.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andreas Schneider
fbd646a783 talloc: Documented talloc with doxygen.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andrew Tridgell
3c5d763962 talloc: fixed talloc_disable_null_tracking()
When we disable null tracking, we need to move any existing objects
that are under the null_context to be parented by the true NULL
context.

We also need a new talloc_enable_null_tracking_no_autofree() function,
as the talloc testsuite cannot cope with the moving of the autofree
context under the null_context as it wants to check exact counts of
objects under the null_context, and smbtorture has a large number of
objects in the autofree_context from .init functions
2009-09-20 13:14:40 -07:00
Stefan Metzmacher
6c9ace27c5 talloc: add defines and functions for TALLOC_MAJOR/MINOR_VERSION
We also use the major and minor versions in the TALLOC_MAGIC,
so that we can detect if two conflicting versions of talloc
are loaded in one process. In this case we use talloc_log() to
output a very useful debug message before we call
talloc_abort().

metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
5760edeeb6 talloc: remove ABI compat functions
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
e40f3144f2 talloc: add talloc_set_log_fn() and talloc_set_log_stderr()
So that the application can setup a log function to get ERROR
and WARNING messages.

metze
2009-08-24 16:29:58 +10:00
Simo Sorce
2738178d13 Restore ABI compatibility for talloc. 2009-07-03 08:45:29 -04:00
Andrew Tridgell
5fe1d8dc12 changes to remove the ambiguity in talloc_free() and talloc_steal()
These changes follow from the discussions on samba-technical. The
changes are in several parts, and stem from the inherent ambiguity
that was in talloc_free() and talloc_steal() when the pointer that is
being changes has more than one parent, via references.

The changes are:

 1) when you call talloc_free() on a pointer with more than one parent
 the free will fail, and talloc will log an error to stderr like this:

    ERROR: talloc_free with references at some/foo.c:123
	   reference at other/bar.c:201
	   reference at other/foobar.c:641
 
 2) Similarly, when you call talloc_steal() on a pointer with more
 than one parent, the steal will fail and talloc will log an error to
 stderr like this:

    ERROR: talloc_steal with references at some/foo.c:123
	   reference at other/bar.c:201

 3) A new function talloc_reparent() has been added to change a parent
 in a controlled fashion. You need to supply both the old parent and
 the new parent. It handles the case whether either the old parent was
 a normal parent or a reference

The use of stderr in the logging is ugly (and potentially dangerous),
and will be removed in a future patch. We'll need to add a debug
registration function to talloc.
2009-07-01 15:15:37 +10:00
Stefan Metzmacher
eff9bcc9c7 talloc: try to fix the source4 build on AIX
metze
2009-06-08 09:40:11 +02:00
Volker Lendecke
979a1b06d0 talloc_array_length: talloc_get_size deals fine with NULL 2009-03-22 22:10:09 +01:00
Volker Lendecke
a83c18062a Revert "Convert the contents of talloc_guide.txt to doxygen-style talloc.h comments"
This reverts commit d21212c919.
2009-03-22 09:48:48 +01:00
Volker Lendecke
b7fb083dd7 Revert "Add a default "undocumented" module"
This reverts commit ba42320c7e.
2009-03-22 09:48:34 +01:00
Volker Lendecke
790326cc38 Revert "Add some initial hook to the front page"
This reverts commit cfce2d3611.
2009-03-22 09:48:27 +01:00
Volker Lendecke
5098f4625e Revert "Reformatting"
This reverts commit db447d0c47.
2009-03-22 09:48:19 +01:00
Volker Lendecke
c67ea37d62 Revert "Document talloc_pool()"
This reverts commit 27944ed745.
2009-03-22 09:48:14 +01:00
Volker Lendecke
6b1a5bbf02 Revert "Add a talloc_internal "module""
This reverts commit 02662d56c6.
2009-03-22 09:48:06 +01:00
Volker Lendecke
cce595d1fc Revert "Document _talloc"
This reverts commit 2ce70d4f5a.
2009-03-22 09:47:59 +01:00
Volker Lendecke
f15a0305f3 Revert "Document TALLOC_FREE()"
This reverts commit 3f81649b8d.
2009-03-22 09:47:51 +01:00
Volker Lendecke
c086c26ffb Revert "Document talloc_parent, talloc_parent_name and talloc_is_parent"
This reverts commit 986c2e01cc.
2009-03-22 09:47:44 +01:00
Volker Lendecke
257ea7e6f1 Revert "Document talloc_zero_array()"
This reverts commit 59dff57455.
2009-03-22 09:47:37 +01:00
Volker Lendecke
59dff57455 Document talloc_zero_array() 2009-03-21 23:57:24 +01:00
Volker Lendecke
986c2e01cc Document talloc_parent, talloc_parent_name and talloc_is_parent 2009-03-21 23:50:33 +01:00
Volker Lendecke
3f81649b8d Document TALLOC_FREE() 2009-03-21 20:04:17 +01:00
Volker Lendecke
2ce70d4f5a Document _talloc 2009-03-21 20:04:17 +01:00
Volker Lendecke
02662d56c6 Add a talloc_internal "module" 2009-03-21 20:04:17 +01:00
Volker Lendecke
27944ed745 Document talloc_pool() 2009-03-21 19:49:40 +01:00
Volker Lendecke
db447d0c47 Reformatting 2009-03-21 19:02:02 +01:00
Volker Lendecke
cfce2d3611 Add some initial hook to the front page 2009-03-21 19:02:02 +01:00
Volker Lendecke
ba42320c7e Add a default "undocumented" module 2009-03-21 19:02:02 +01:00
Volker Lendecke
d21212c919 Convert the contents of talloc_guide.txt to doxygen-style talloc.h comments
talloc_guide.txt was partly outdated, and as going through talloc.h now shows
it was incomplete.
2009-03-21 19:02:01 +01:00
Stefan Metzmacher
6d4a13241a talloc: add useful talloc_array_length() macro
metze
2009-03-16 11:14:53 +01:00
Stefan Metzmacher
a3998832db talloc: add TALLOC_ZERO()
metze
2009-03-16 11:14:53 +01:00
Stefan Metzmacher
7a8b97ec2b talloc: add talloc_set_abort_fn()
metze
2009-03-12 12:04:31 +01:00
Stefan Metzmacher
b6f479d441 talloc: add talloc_get_type_abort()
metze
2009-03-03 18:07:33 +01:00
Jelmer Vernooij
94855cd692 Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00