[evolution-data-server/gnome-2-30] Bug #615246 - Teach camel_sexp_to_sql_sexp about no-arg (match-all)



commit 0372ae61e5bb24aad1caebd41eecf25564245feb
Author: Matt McCutchen 2 <matt mattmccutchen net>
Date:   Tue Apr 27 14:21:11 2010 +0200

    Bug #615246 - Teach camel_sexp_to_sql_sexp about no-arg (match-all)

 camel/camel-search-sql-sexp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index def0937..50c4ce3 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -298,7 +298,10 @@ match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 	ESExpResult *r;
 
 	d(printf("executing match-all: %d", argc));
-	if (argv[0]->type != ESEXP_TERM_BOOL)
+	if (argc == 0) {
+		r = e_sexp_result_new (f, ESEXP_RES_STRING);
+		r->value.string = g_strdup ("1");
+	} else if (argv[0]->type != ESEXP_TERM_BOOL)
 		r = e_sexp_term_eval(f, argv[0]);
 	else {
 		r = e_sexp_result_new(f, ESEXP_RES_STRING);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]