1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

16 Commits

Author SHA1 Message Date
Andrew Tridgell
ad1af519eb r4793: minor doc updates 2007-10-10 13:08:55 -05:00
Andrew Tridgell
c283e1a3ef r4790: added type checking helper macros in talloc. These take advantage of
the type names that talloc already keeps around for pointers, and
allows the user to type check void* private pointers. It can also be
used to implement polymorphism in C, as I'm sure someone would have
pointed out to me sooner or later :-)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
603ef69be0 r4718: don't use the deprecated __va_copy() unless va_copy() is unavailable 2007-10-10 13:08:47 -05:00
Andrew Tridgell
4ec47cc108 r4711: - deprecate talloc_destroy()
- expanded the talloc_realloc() test a little (I was concerned about a
  possible bug, which turned out to be an illusion)

- don't enable gcov by default in Makefile.talloc
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
9b9501bc03 r4689: - make talloc_report_depth() public
- add talloc_parent() to return the parent context of a pointer

these are very use full for debuging

metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
4ab63d5479 r4688: don't run male proto for lib/talloc/
metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
a88aac7a39 r4687: use struct type and location for easier finding
metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
11e006df16 r4609: add a usefull data_blob_dup_talloc() macro
metze
2007-10-10 13:08:33 -05:00
Andrew Tridgell
2fe0e2528f r4593: don't use the _p function in the testsuite, as when built standalone it doesn't
use TALLOC_DEPRECATED
2007-10-10 13:08:30 -05:00
Andrew Tridgell
1177200dd9 r4592: fixed typo from talloc testsuite fixup for the new syntax 2007-10-10 13:08:30 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
2011bbeb84 r4550: talloc() is now typesafe. It is exactly equivalent to the old talloc_p() macro. Use
talloc_size() if you want the old behaviour.

I have kept talloc_p() as an alias for now. Once we change all calls
to be plain talloc() then we can remove it.
2007-10-10 13:08:26 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
e6c81d7c9f r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
2007-10-10 13:08:20 -05:00
Andrew Tridgell
cf73dda652 r4479: added the function talloc_autofree_context() which returns a talloc context that
will automatically be freed on program exit. This is useful for reducing
clutter in leak reports
2007-10-10 13:08:10 -05:00
Andrew Tridgell
98b5f73c1b r4473: - moved talloc into its own lib/talloc/ area
- added gcov flags to Makefile.talloc

- expanded talloc testsuite to add a test for realloc with a child ptr

- fixed a bug in talloc_realloc() with realloc of a ptr that has child ptrs
2007-10-10 13:07:55 -05:00