1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

r17885: use _TALLOC_TYPEPF() consitently

metze
(This used to be commit 155cd6b88283b85c53c7ec65efcf431da7b649ac)
This commit is contained in:
Stefan Metzmacher 2006-08-28 15:36:12 +00:00 committed by Gerald (Jerry) Carter
parent 6f7dd6ca07
commit 82d4c5095d

View File

@ -58,13 +58,12 @@ typedef void TALLOC_CTX;
#define _TALLOC_TYPEOF(ptr) __typeof__(ptr)
#define talloc_set_destructor(ptr, function) \
do { \
int (*_talloc_destructor_fn)(typeof(ptr)) = (function); \
int (*_talloc_destructor_fn)(_TALLOC_TYPEOF(ptr)) = (function); \
_talloc_set_destructor((ptr), (void *)_talloc_destructor_fn); \
} while(0)
#define _TALLOC_CHECK_TYPE(type,val)
/* this extremely strange macro is to avoid some braindamaged warning
stupidity in gcc 4.1.x */
#define talloc_steal(ctx, ptr) ({ __typeof__(ptr) __talloc_steal_ret = (__typeof__(ptr))_talloc_steal((ctx),(ptr)); __talloc_steal_ret; })
#define talloc_steal(ctx, ptr) ({ _TALLOC_TYPEOF(ptr) __talloc_steal_ret = (_TALLOC_TYPEOF(ptr))_talloc_steal((ctx),(ptr)); __talloc_steal_ret; })
#else
#define talloc_set_destructor(ptr, function) \
_talloc_set_destructor((ptr), (int (*)(void *))(function))