svn commit: samba r22540 - in branches: SAMBA_3_0/source/lib/talloc SAMBA_3_0_25/source/lib/talloc SAMBA_4_0/source/lib/talloc

jra at samba.org jra at samba.org
Fri Apr 27 21:58:11 GMT 2007


Author: jra
Date: 2007-04-27 21:58:10 +0000 (Fri, 27 Apr 2007)
New Revision: 22540

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

Log:
Added _strict varients of the macro calls - added
prototypes.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/talloc/talloc.h
   branches/SAMBA_3_0_25/source/lib/talloc/talloc.h
   branches/SAMBA_4_0/source/lib/talloc/talloc.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/talloc/talloc.h
===================================================================
--- branches/SAMBA_3_0/source/lib/talloc/talloc.h	2007-04-27 21:09:16 UTC (rev 22539)
+++ branches/SAMBA_3_0/source/lib/talloc/talloc.h	2007-04-27 21:58:10 UTC (rev 22540)
@@ -92,6 +92,7 @@
 /* Varient of talloc_zero that returns NULL if size is zero. */
 #define talloc_zero_strict(ctx, type) (type *)_talloc_zero_strict(ctx, sizeof(type), #type)
 #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__)
+#define talloc_zero_size_strict(ctx, size) _talloc_zero_strict(ctx, size, __location__)
 
 #define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
 /* Varient of talloc_zero_array that returns NULL if count is zero. */
@@ -100,6 +101,7 @@
 /* Varient of talloc_array that returns NULL if count is zero. */
 #define talloc_array_strict(ctx, type, count) (type *)_talloc_array_strict(ctx, sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
+#define talloc_array_size_strict(ctx, size, count) _talloc_array_strict(ctx, size, count, __location__)
 #define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
@@ -160,7 +162,9 @@
 void talloc_enable_leak_report(void);
 void talloc_enable_leak_report_full(void);
 void *_talloc_zero(const void *ctx, size_t size, const char *name);
+void *_talloc_zero_strict(const void *ctx, size_t size, const char *name);
 void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
+void *_talloc_memdup_strict(const void *t, const void *p, size_t size, const char *name);
 char *talloc_strdup(const void *t, const char *p);
 char *talloc_strndup(const void *t, const char *p, size_t n);
 char *talloc_append_string(const void *t, char *orig, const char *append);
@@ -169,7 +173,9 @@
 char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_zero_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
 void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
 void *talloc_autofree_context(void);

Modified: branches/SAMBA_3_0_25/source/lib/talloc/talloc.h
===================================================================
--- branches/SAMBA_3_0_25/source/lib/talloc/talloc.h	2007-04-27 21:09:16 UTC (rev 22539)
+++ branches/SAMBA_3_0_25/source/lib/talloc/talloc.h	2007-04-27 21:58:10 UTC (rev 22540)
@@ -88,6 +88,7 @@
 /* Varient of talloc_zero that returns NULL if size is zero. */
 #define talloc_zero_strict(ctx, type) (type *)_talloc_zero_strict(ctx, sizeof(type), #type)
 #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__)
+#define talloc_zero_size_strict(ctx, size) _talloc_zero_strict(ctx, size, __location__)
 
 #define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
 /* Varient of talloc_zero_array that returns NULL if count is zero. */
@@ -96,6 +97,7 @@
 /* Varient of talloc_array that returns NULL if count is zero. */
 #define talloc_array_strict(ctx, type, count) (type *)_talloc_array_strict(ctx, sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
+#define talloc_array_size_strict(ctx, size, count) _talloc_array_strict(ctx, size, count, __location__)
 #define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
@@ -156,7 +158,9 @@
 void talloc_enable_leak_report(void);
 void talloc_enable_leak_report_full(void);
 void *_talloc_zero(const void *ctx, size_t size, const char *name);
+void *_talloc_zero_strict(const void *ctx, size_t size, const char *name);
 void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
+void *_talloc_memdup_strict(const void *t, const void *p, size_t size, const char *name);
 char *talloc_strdup(const void *t, const char *p);
 char *talloc_strndup(const void *t, const char *p, size_t n);
 char *talloc_append_string(const void *t, char *orig, const char *append);
@@ -165,7 +169,9 @@
 char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_zero_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
 void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
 void *talloc_autofree_context(void);

Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.h
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.h	2007-04-27 21:09:16 UTC (rev 22539)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.h	2007-04-27 21:58:10 UTC (rev 22540)
@@ -92,6 +92,7 @@
 /* Varient of talloc_zero that returns NULL if size is zero. */
 #define talloc_zero_strict(ctx, type) (type *)_talloc_zero_strict(ctx, sizeof(type), #type)
 #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__)
+#define talloc_zero_size_strict(ctx, size) _talloc_zero_strict(ctx, size, __location__)
 
 #define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
 /* Varient of talloc_zero_array that returns NULL if count is zero. */
@@ -100,6 +101,7 @@
 /* Varient of talloc_array that returns NULL if count is zero. */
 #define talloc_array_strict(ctx, type, count) (type *)_talloc_array_strict(ctx, sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
+#define talloc_array_size_strict(ctx, size, count) _talloc_array_strict(ctx, size, count, __location__)
 #define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
@@ -160,7 +162,9 @@
 void talloc_enable_leak_report(void);
 void talloc_enable_leak_report_full(void);
 void *_talloc_zero(const void *ctx, size_t size, const char *name);
+void *_talloc_zero_strict(const void *ctx, size_t size, const char *name);
 void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
+void *_talloc_memdup_strict(const void *t, const void *p, size_t size, const char *name);
 char *talloc_strdup(const void *t, const char *p);
 char *talloc_strndup(const void *t, const char *p, size_t n);
 char *talloc_append_string(const void *t, char *orig, const char *append);
@@ -169,7 +173,9 @@
 char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+void *_talloc_zero_array_strict(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
 void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
 void *talloc_autofree_context(void);



More information about the samba-cvs mailing list