dovecot: Added IMAP_ARG_TYPE_IS_STRING()

dovecot at dovecot.org dovecot at dovecot.org
Sat Jun 30 00:48:20 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/4906791b8256
changeset: 5838:4906791b8256
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 29 19:26:27 2007 +0300
description:
Added IMAP_ARG_TYPE_IS_STRING()

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/lib-imap/imap-parser.h |    7 +++++--

diffs (19 lines):

diff -r 5cd5f65a8dad -r 4906791b8256 src/lib-imap/imap-parser.h
--- a/src/lib-imap/imap-parser.h	Fri Jun 29 19:24:58 2007 +0300
+++ b/src/lib-imap/imap-parser.h	Fri Jun 29 19:26:27 2007 +0300
@@ -50,10 +50,13 @@ struct imap_arg {
 	} _data;
 };
 
+#define IMAP_ARG_TYPE_IS_STRING(type) \
+	((type) == IMAP_ARG_ATOM || (type) == IMAP_ARG_STRING || \
+	 (type) == IMAP_ARG_LITERAL)
+
 #define IMAP_ARG_STR(arg) \
 	((arg)->type == IMAP_ARG_NIL ? NULL : \
-	 (arg)->type == IMAP_ARG_ATOM || (arg)->type == IMAP_ARG_STRING || \
-	 (arg)->type == IMAP_ARG_LITERAL ? \
+	 IMAP_ARG_TYPE_IS_STRING((arg)->type) ? \
 	 (arg)->_data.str : _imap_arg_str_error(arg))
 
 #define IMAP_ARG_STR_NONULL(arg) \


More information about the dovecot-cvs mailing list