1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-23 11:17:06 +03:00

7 Commits

Author SHA1 Message Date
Andrew Tridgell
7b79694ead 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 :-)
(This used to be commit c283e1a3efac3a92e29a35856e20eb61ef4c221e)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
c710c0671f r4718: don't use the deprecated __va_copy() unless va_copy() is unavailable
(This used to be commit 603ef69be075821e3ffe2084bb5cfb0bc9cce180)
2007-10-10 13:08:47 -05:00
Stefan Metzmacher
90d65c2e85 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
(This used to be commit 9b9501bc03ef8d4b53049f6b3531d06ed7ef7f89)
2007-10-10 13:08:43 -05:00
Andrew Tridgell
11ce2cfd70 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.
(This used to be commit 6e7754abd0c225527fb38363996a6e241b87b37e)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
e159e42d84 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.
(This used to be commit 2011bbeb841fd6bfccf3d44a49f79203f7f55baa)
2007-10-10 13:08:26 -05:00
Andrew Tridgell
f4b349127b 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
(This used to be commit cf73dda652e0a121901f22771104be6751c0fcb9)
2007-10-10 13:08:10 -05:00
Andrew Tridgell
65f96eba32 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
(This used to be commit 98b5f73c1ba34d7576c5995069b485c1c5ede324)
2007-10-10 13:07:55 -05:00