[dovecot-cvs] dovecot/src/lib array.h,1.21,1.22
tss at dovecot.org
tss at dovecot.org
Thu Jan 25 13:17:14 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv11295
Modified Files:
array.h
Log Message:
Removed disable-asserts-specific array_idx(). It didn't work if array's
element_size was different than sizeof(element type).
Index: array.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/array.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- array.h 15 Nov 2006 19:14:08 -0000 1.21
+++ array.h 25 Jan 2007 13:17:12 -0000 1.22
@@ -158,13 +158,8 @@
i_assert(idx * array->element_size < array->buffer->used);
return CONST_PTR_OFFSET(array->buffer->data, idx * array->element_size);
}
-#ifdef DISABLE_ASSERTS
-# define array_idx(array, idx) \
- &((*(array)->v)[idx])
-#else
-# define array_idx(array, idx) \
+#define array_idx(array, idx) \
ARRAY_TYPE_CAST_CONST(array)_array_idx(&(array)->arr, idx)
-#endif
static inline void *
_array_get_modifiable(struct array *array, unsigned int *count_r)
More information about the dovecot-cvs
mailing list