svn commit: samba r20194 - in branches/SAMBA_4_0/source/lib/talloc: .

metze at samba.org metze at samba.org
Fri Dec 15 22:47:50 GMT 2006


Author: metze
Date: 2006-12-15 22:47:50 +0000 (Fri, 15 Dec 2006)
New Revision: 20194

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

Log:
inline all static talloc functions

metze
Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-12-15 22:45:36 UTC (rev 20193)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-12-15 22:47:50 UTC (rev 20194)
@@ -162,7 +162,7 @@
 /*
   return the parent chunk of a pointer
 */
-static struct talloc_chunk *talloc_parent_chunk(const void *ptr)
+static inline struct talloc_chunk *talloc_parent_chunk(const void *ptr)
 {
 	struct talloc_chunk *tc;
 
@@ -261,6 +261,8 @@
 
 /*
   helper for talloc_reference()
+
+  this is referenced by a function pointer and should not be inline
 */
 static int talloc_reference_destructor(struct talloc_reference_handle *handle)
 {
@@ -477,7 +479,7 @@
   talloc_reference() has done. The context and pointer arguments
   must match those given to a talloc_reference()
 */
-static int talloc_unreference(const void *context, const void *ptr)
+static inline int talloc_unreference(const void *context, const void *ptr)
 {
 	struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
 	struct talloc_reference_handle *h;
@@ -557,9 +559,9 @@
 /*
   add a name to an existing pointer - va_list version
 */
-static const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+static inline const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
 
-static const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap)
+static inline const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap)
 {
 	struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
 	tc->name = talloc_vasprintf(ptr, fmt, ap);



More information about the samba-cvs mailing list