r16922: move some macros out of talloc.h as the don't belong to talloc
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Jul 2006 16:47:47 +0000 (16:47 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:10:01 +0000 (14:10 -0500)
metze
(This used to be commit 4c68e315e2288eef97527911daf18622a994ac31)

source4/lib/talloc/talloc.h
source4/lib/util/util.h

index d71e60cb4526dab7f0b0c00946219aeb46f84d03..a4eef14bd04e7cc6ce6ee092a6bc435dde37a17e 100644 (file)
@@ -86,14 +86,6 @@ typedef void TALLOC_CTX;
 
 #define talloc_memdup(t, p, size) _talloc_memdup(t, p, size, __location__)
 
-#define malloc_p(type) (type *)malloc(sizeof(type))
-#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
-#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
-
-#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: "__location__)
-#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: "__location__)
-#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob)->data, (blob)->length, "DATA_BLOB: "__location__)
-
 #define talloc_set_type(ptr, type) talloc_set_name_const(ptr, #type)
 #define talloc_get_type(ptr, type) (type *)talloc_check_name(ptr, #type)
 
index f1a6fc4c30149cad9704cbd9cd8dec7a8d9968cb..2517966d9075363fdb843a9115a699581a4c3667 100644 (file)
@@ -100,6 +100,10 @@ extern const char *panic_action;
  */
 #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
 
+#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: "__location__)
+#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: "__location__)
+#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob)->data, (blob)->length, "DATA_BLOB: "__location__)
+
 #if defined(VALGRIND)
 #define strlen(x) valgrind_strlen(x)
 #endif