svn commit: samba r6647 - in trunk/source: include lib
idra at samba.org
idra at samba.org
Sat May 7 16:07:54 GMT 2005
Author: idra
Date: 2005-05-07 16:07:54 +0000 (Sat, 07 May 2005)
New Revision: 6647
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6647
Log:
add talloc mods also in trunk
Modified:
trunk/source/include/talloc.h
trunk/source/lib/talloc.c
Changeset:
Modified: trunk/source/include/talloc.h
===================================================================
--- trunk/source/include/talloc.h 2005-05-07 16:04:37 UTC (rev 6646)
+++ trunk/source/include/talloc.h 2005-05-07 16:07:54 UTC (rev 6647)
@@ -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: trunk/source/lib/talloc.c
===================================================================
--- trunk/source/lib/talloc.c 2005-05-07 16:04:37 UTC (rev 6646)
+++ trunk/source/lib/talloc.c 2005-05-07 16:07:54 UTC (rev 6647)
@@ -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