r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
[samba.git] / source / lib / talloc / talloc.h
index b9ecd8f0b81c4224df591b95ec3d7f020b5b33c6..56f9dbb21ab4cc9787edbd03bb281b66c112830a 100644 (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)