svn commit: samba r6646 - in branches/SAMBA_3_0/source: include lib

idra at samba.org idra at samba.org
Sat May 7 16:04:37 GMT 2005


Author: idra
Date: 2005-05-07 16:04:37 +0000 (Sat, 07 May 2005)
New Revision: 6646

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

Log:

keep samba3 talloc inline with samba4 one


Modified:
   branches/SAMBA_3_0/source/include/talloc.h
   branches/SAMBA_3_0/source/lib/talloc.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/talloc.h
===================================================================
--- branches/SAMBA_3_0/source/include/talloc.h	2005-05-07 15:22:45 UTC (rev 6645)
+++ branches/SAMBA_3_0/source/include/talloc.h	2005-05-07 16:04:37 UTC (rev 6646)
@@ -122,6 +122,7 @@
 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);
+size_t talloc_get_size(const void *ctx);
 
 #endif
 

Modified: branches/SAMBA_3_0/source/lib/talloc.c
===================================================================
--- branches/SAMBA_3_0/source/lib/talloc.c	2005-05-07 15:22:45 UTC (rev 6645)
+++ branches/SAMBA_3_0/source/lib/talloc.c	2005-05-07 16:04:37 UTC (rev 6646)
@@ -1081,4 +1081,13 @@
 	return cleanup_context;
 }
 
+size_t talloc_get_size(const void *context) {
+	struct talloc_chunk *tc;
 
+	if (context == NULL)
+		return 0;
+
+	tc = talloc_chunk_from_ptr(context);
+
+	return tc->size;
+}



More information about the samba-cvs mailing list