dovecot-2.0: Added CONST_STRUCT_MEMBER_P() and removed unused (b...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Mar 27 01:54:38 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/961ded33ca0a
changeset: 10997:961ded33ca0a
user: Timo Sirainen <tss at iki.fi>
date: Sat Mar 27 01:40:04 2010 +0200
description:
Added CONST_STRUCT_MEMBER_P() and removed unused (broken) STRUCT_MEMBER().
diffstat:
src/lib/macros.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r 43f2452b7dd8 -r 961ded33ca0a src/lib/macros.h
--- a/src/lib/macros.h Sat Mar 27 01:34:23 2010 +0200
+++ b/src/lib/macros.h Sat Mar 27 01:40:04 2010 +0200
@@ -67,8 +67,8 @@
*/
#define STRUCT_MEMBER_P(struct_p, struct_offset) \
((void *) ((char *) (struct_p) + (long) (struct_offset)))
-#define STRUCT_MEMBER(member_type, struct_p, struct_offset) \
- (*(member_type *) G_STRUCT_MEMBER_P((struct_p), (struct_offset)))
+#define CONST_STRUCT_MEMBER_P(struct_p, struct_offset) \
+ ((const void *) ((const char *) (struct_p) + (long) (struct_offset)))
/* Provide simple macro statement wrappers (adapted from Perl):
STMT_START { statements; } STMT_END;
More information about the dovecot-cvs
mailing list