[dovecot-cvs] dovecot/src/lib seq-range-array.c, 1.5, 1.5.2.1 seq-range-array.h, 1.2, 1.2.2.1
tss at dovecot.org
tss at dovecot.org
Sun Oct 15 18:44:32 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv25197
Modified Files:
Tag: branch_1_0
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.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- seq-range-array.c 20 Apr 2006 16:02:37 -0000 1.5
+++ seq-range-array.c 15 Oct 2006 17:44:29 -0000 1.5.2.1
@@ -4,13 +4,14 @@
#include "array.h"
#include "seq-range-array.h"
-static bool seq_range_lookup(array_t *array, uint32_t seq, unsigned int *idx_r)
+static bool
+seq_range_lookup(const array_t *array, uint32_t seq, unsigned int *idx_r)
{
ARRAY_SET_TYPE(array, struct seq_range);
- struct seq_range *data;
+ const struct seq_range *data;
unsigned int idx, left_idx, right_idx, count;
- data = array_get_modifyable(array, &count);
+ data = array_get(array, &count);
idx = 0; left_idx = 0; right_idx = count;
while (left_idx < right_idx) {
@@ -174,7 +175,7 @@
}
}
-bool seq_range_exists(array_t *array, uint32_t seq)
+bool seq_range_exists(const array_t *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.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- seq-range-array.h 13 Jan 2006 20:26:01 -0000 1.2
+++ seq-range-array.h 15 Oct 2006 17:44:29 -0000 1.2.2.1
@@ -7,6 +7,6 @@
void seq_range_array_add(array_t *array, unsigned int init_count, uint32_t seq);
void seq_range_array_remove(array_t *array, uint32_t seq);
-bool seq_range_exists(array_t *array, uint32_t seq);
+bool seq_range_exists(const array_t *array, uint32_t seq);
#endif
More information about the dovecot-cvs
mailing list