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

r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface

exposed.

Unfortunately this generates a large number of type punning
warnings. We'll have to find some magic to hide those.
This commit is contained in:
Andrew Tridgell
2006-09-13 02:33:51 +00:00
committed by Gerald (Jerry) Carter
parent b0de283882
commit 254cbf09de
14 changed files with 34 additions and 32 deletions

View File

@@ -73,7 +73,7 @@ typedef void TALLOC_CTX;
#endif
#define talloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_reference((ctx),(ptr))
#define talloc_move(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_move((ctx),&(ptr))
#define talloc_move(ctx, ptr) (_TALLOC_TYPEOF(*(ptr)))_talloc_move((ctx),(const void **)(ptr))
/* useful macros for creating type checked pointers */
#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)