[dovecot-cvs] dovecot/src/lib seq-range-array.c, 1.8, 1.9 seq-range-array.h, 1.3, 1.4

tss at dovecot.org tss at dovecot.org
Sun Oct 15 18:44:37 UTC 2006


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

Modified Files:
	seq-range-array.c seq-range-array.h 
Log Message:
seq_range_exists() can take a const pointer to the array.



Index: seq-range-array.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- seq-range-array.c	10 Sep 2006 12:48:14 -0000	1.8
+++ seq-range-array.c	15 Oct 2006 17:44:32 -0000	1.9
@@ -4,13 +4,13 @@
 #include "array.h"
 #include "seq-range-array.h"
 
-static bool seq_range_lookup(ARRAY_TYPE(seq_range) *array,
+static bool seq_range_lookup(const ARRAY_TYPE(seq_range) *array,
 			     uint32_t seq, unsigned int *idx_r)
 {
-	struct seq_range *data;
+	const struct seq_range *data;
 	unsigned int idx, left_idx, right_idx, count;
 
-	data = array_get_modifiable(array, &count);
+	data = array_get(array, &count);
 
 	idx = 0; left_idx = 0; right_idx = count;
 	while (left_idx < right_idx) {
@@ -171,7 +171,7 @@
 	}
 }
 
-bool seq_range_exists(ARRAY_TYPE(seq_range) *array, uint32_t seq)
+bool seq_range_exists(const ARRAY_TYPE(seq_range) *array, uint32_t seq)
 {
 	unsigned int idx;
 

Index: seq-range-array.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- seq-range-array.h	28 Jun 2006 13:10:33 -0000	1.3
+++ seq-range-array.h	15 Oct 2006 17:44:33 -0000	1.4
@@ -10,6 +10,6 @@
 void seq_range_array_add(ARRAY_TYPE(seq_range) *array, unsigned int init_count,
 			 uint32_t seq);
 void seq_range_array_remove(ARRAY_TYPE(seq_range) *array, uint32_t seq);
-bool seq_range_exists(ARRAY_TYPE(seq_range) *array, uint32_t seq);
+bool seq_range_exists(const ARRAY_TYPE(seq_range) *array, uint32_t seq);
 
 #endif



More information about the dovecot-cvs mailing list