[dovecot-cvs] dovecot/src/lib data-stack.c, 1.22, 1.23 data-stack.h, 1.4, 1.5

cras at dovecot.org cras at dovecot.org
Sun Mar 27 16:29:07 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv17732

Modified Files:
	data-stack.c data-stack.h 
Log Message:
Added t_get_bytes_available().



Index: data-stack.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/data-stack.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- data-stack.c	12 Mar 2005 23:10:33 -0000	1.22
+++ data-stack.c	27 Mar 2005 13:29:04 -0000	1.23
@@ -310,6 +310,11 @@
 	return FALSE;
 }
 
+size_t t_get_bytes_available(void)
+{
+	return current_block->left;
+}
+
 void *t_buffer_get(size_t size)
 {
 	void *ret;

Index: data-stack.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/data-stack.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- data-stack.h	28 Oct 2002 04:50:14 -0000	1.4
+++ data-stack.h	27 Mar 2005 13:29:04 -0000	1.5
@@ -60,6 +60,10 @@
    for last allocated memory in current stack frame. */
 int t_try_realloc(void *mem, size_t size);
 
+/* Returns the number of bytes available in data stack without allocating
+   more memory. */
+size_t t_get_bytes_available(void);
+
 #define t_new(type, count) \
 	((type *) t_malloc0(sizeof(type) * (count)))
 



More information about the dovecot-cvs mailing list