svn commit: samba r16922 - in branches/SAMBA_4_0/source/lib: talloc util

metze at samba.org metze at samba.org
Mon Jul 10 16:47:47 GMT 2006


Author: metze
Date: 2006-07-10 16:47:47 +0000 (Mon, 10 Jul 2006)
New Revision: 16922

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16922

Log:
move some macros out of talloc.h as the don't belong to talloc

metze
Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.h
   branches/SAMBA_4_0/source/lib/util/util.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.h
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.h	2006-07-10 16:05:29 UTC (rev 16921)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.h	2006-07-10 16:47:47 UTC (rev 16922)
@@ -86,14 +86,6 @@
 
 #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)
 

Modified: branches/SAMBA_4_0/source/lib/util/util.h
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util.h	2006-07-10 16:05:29 UTC (rev 16921)
+++ branches/SAMBA_4_0/source/lib/util/util.h	2006-07-10 16:47:47 UTC (rev 16922)
@@ -100,6 +100,10 @@
  */
 #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



More information about the samba-cvs mailing list