aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-25 03:34:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-25 03:34:11 +0800
commited975fa25368ea637ca9ab1e58e04b5e5364eda7 (patch)
tree86c6b37d31933733c1f9d9d87361fa0ed621ec3a /camel
parent0e01b294facae9991facf2d8cc01a97d0037065f (diff)
downloadgsoc2013-evolution-ed975fa25368ea637ca9ab1e58e04b5e5364eda7.tar.gz
gsoc2013-evolution-ed975fa25368ea637ca9ab1e58e04b5e5364eda7.tar.zst
gsoc2013-evolution-ed975fa25368ea637ca9ab1e58e04b5e5364eda7.zip
This expression can never return an array. We must always return a string
2003-03-24 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-search.c (search_user_tag): This expression can never return an array. We must always return a string value. svn path=/trunk/; revision=20487
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-folder-search.c27
2 files changed, 16 insertions, 16 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e2d39d4a7b..9b22d11fe9 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-24 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-folder-search.c (search_user_tag): This expression can
+ never return an array. We must always return a string value.
+
2003-03-24 Timo Sirainen <tss@iki.fi>
* camel-imap-command.c (imap_read_untagged) Integer overflow fix.
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index ef6dfc8564..00315fafdc 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -1052,25 +1052,20 @@ search_system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, Came
return r;
}
-static ESExpResult *search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+static ESExpResult *
+search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
{
+ const char *value = NULL;
ESExpResult *r;
-
+
r(printf("executing user-tag\n"));
-
- /* are we inside a match-all? */
- if (search->current) {
- const char *value = NULL;
- if (argc == 1) {
- value = camel_tag_get(&search->current->user_tags, argv[0]->value.string);
- }
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- r->value.string = g_strdup(value?value:"");
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
- }
-
+
+ if (argc == 1)
+ value = camel_tag_get (&search->current->user_tags, argv[0]->value.string);
+
+ r = e_sexp_result_new(f, ESEXP_RES_STRING);
+ r->value.string = g_strdup (value ? value : "");
+
return r;
}