summaryrefslogtreecommitdiff
path: root/source4/lib/talloc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-15 22:47:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:21 -0500
commit0d2bedbdd7c5ee5b955a28629ef838d1a35edc45 (patch)
tree3ac9839d5780abf56689adc43c2466da1eafd0a7 /source4/lib/talloc
parentbfbf6d546bcea8ea3051a4ff93ed69f1dbf45ffe (diff)
downloadsamba-0d2bedbdd7c5ee5b955a28629ef838d1a35edc45.tar.gz
samba-0d2bedbdd7c5ee5b955a28629ef838d1a35edc45.tar.bz2
samba-0d2bedbdd7c5ee5b955a28629ef838d1a35edc45.zip
r20194: inline all static talloc functions
metze (This used to be commit ee47b404412299ac0e341f0d269adc21a7ebc603)
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r--source4/lib/talloc/talloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index dafb6d9075..a23de0c8a7 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -162,7 +162,7 @@ do { \
/*
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 @@ int talloc_increase_ref_count(const void *ptr)
/*
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 @@ void *_talloc_steal(const void *new_ctx, const void *ptr)
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 @@ int talloc_unlink(const void *context, void *ptr)
/*
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);