1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r22541: Added talloc_size_strict macro.

Jeremy.
This commit is contained in:
Jeremy Allison 2007-04-27 22:04:27 +00:00 committed by Gerald (Jerry) Carter
parent ba1a66cc6f
commit 219e1cae77

View File

@ -84,6 +84,7 @@ typedef void TALLOC_CTX;
/* useful macros for creating type checked pointers */
#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
#define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__)
#define talloc_size_strict(ctx, size) talloc_strict(ctx, size, __location__)
#define talloc_ptrtype(ctx, ptr) (_TALLOC_TYPEOF(ptr))talloc_size(ctx, sizeof(*(ptr)))
#define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__)