diff options
author | Corentin Noël <corentin@elementary.io> | 2017-05-31 14:48:05 +0200 |
---|---|---|
committer | Corentin Noël <corentin@elementary.io> | 2017-05-31 14:48:05 +0200 |
commit | d2c23a365eda35bf51497e74ab1faca54666b77f (patch) | |
tree | 67cf48605fd85f0536a8500d5a19f7b7a4958a91 | |
parent | f1205d1fc04abf0e4a1cdfc7aa918d1901903e0d (diff) | |
download | evolution-data-server-wip/tintou/sexp-gir.tar.gz |
Include ESExp in the GObject introspectionwip/tintou/sexp-gir
-rw-r--r-- | src/addressbook/backends/ldap/e-book-backend-ldap.c | 4 | ||||
-rw-r--r-- | src/addressbook/libebook-contacts/e-book-query.c | 4 | ||||
-rw-r--r-- | src/addressbook/libedata-book/e-book-backend-sexp.c | 4 | ||||
-rw-r--r-- | src/addressbook/libedata-book/e-book-backend-sqlitedb.c | 16 | ||||
-rw-r--r-- | src/addressbook/libedata-book/e-book-backend-summary.c | 8 | ||||
-rw-r--r-- | src/calendar/libedata-cal/e-cal-backend-sexp.c | 4 | ||||
-rw-r--r-- | src/libedataserver/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/libedataserver/e-sexp.c | 32 | ||||
-rw-r--r-- | src/libedataserver/e-sexp.h | 12 |
9 files changed, 42 insertions, 43 deletions
diff --git a/src/addressbook/backends/ldap/e-book-backend-ldap.c b/src/addressbook/backends/ldap/e-book-backend-ldap.c index c0840f093..f2f179ceb 100644 --- a/src/addressbook/backends/ldap/e-book-backend-ldap.c +++ b/src/addressbook/backends/ldap/e-book-backend-ldap.c @@ -3796,7 +3796,7 @@ func_exists (struct _ESExp *f, /* 'builtin' functions */ static struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } symbols[] = { @@ -3829,7 +3829,7 @@ e_book_backend_ldap_build_query (EBookBackendLDAP *bl, for (i = 0; i < G_N_ELEMENTS (symbols); i++) { if (symbols[i].type == 1) { e_sexp_add_ifunction (sexp, 0, symbols[i].name, - (ESExpIFunc *) symbols[i].func, &data); + (ESExpIFunc) symbols[i].func, &data); } else { e_sexp_add_function ( sexp, 0, symbols[i].name, diff --git a/src/addressbook/libebook-contacts/e-book-query.c b/src/addressbook/libebook-contacts/e-book-query.c index d182f53cc..73fa551fd 100644 --- a/src/addressbook/libebook-contacts/e-book-query.c +++ b/src/addressbook/libebook-contacts/e-book-query.c @@ -723,7 +723,7 @@ func_exists_vcard (struct _ESExp *f, /* 'builtin' functions */ static const struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } symbols[] = { @@ -765,7 +765,7 @@ e_book_query_from_string (const gchar *query_string) for (i = 0; i < G_N_ELEMENTS (symbols); i++) { if (symbols[i].type == 1) { e_sexp_add_ifunction (sexp, 0, symbols[i].name, - (ESExpIFunc *) symbols[i].func, &list); + (ESExpIFunc) symbols[i].func, &list); } else { e_sexp_add_function ( sexp, 0, symbols[i].name, diff --git a/src/addressbook/libedata-book/e-book-backend-sexp.c b/src/addressbook/libedata-book/e-book-backend-sexp.c index 0f3ab69ec..a5418aaf7 100644 --- a/src/addressbook/libedata-book/e-book-backend-sexp.c +++ b/src/addressbook/libedata-book/e-book-backend-sexp.c @@ -1115,7 +1115,7 @@ e_book_backend_sexp_init (EBookBackendSExp *sexp) /* 'builtin' functions */ static struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* 1 if a function can perform shortcut evaluation, * or doesn't execute everything, 0 otherwise */ } symbols[] = { @@ -1157,7 +1157,7 @@ e_book_backend_sexp_new (const gchar *text) e_sexp_add_ifunction ( sexp->priv->search_sexp, 0, symbols[ii].name, - (ESExpIFunc *) symbols[ii].func, + (ESExpIFunc) symbols[ii].func, sexp->priv->search_context); } else { e_sexp_add_function ( diff --git a/src/addressbook/libedata-book/e-book-backend-sqlitedb.c b/src/addressbook/libedata-book/e-book-backend-sqlitedb.c index 23cdb36b1..0942724d9 100644 --- a/src/addressbook/libedata-book/e-book-backend-sqlitedb.c +++ b/src/addressbook/libedata-book/e-book-backend-sqlitedb.c @@ -3263,12 +3263,12 @@ func_check_regex_raw (struct _ESExp *f, /* 'builtin' functions */ static const struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } check_symbols[] = { - { "and", (ESExpFunc *) func_check_subset, 1}, - { "or", (ESExpFunc *) func_check_subset, 1}, + { "and", (ESExpFunc) func_check_subset, 1}, + { "or", (ESExpFunc) func_check_subset, 1}, { "contains", func_check, 0 }, { "is", func_check, 0 }, @@ -3304,7 +3304,7 @@ e_book_backend_sqlitedb_check_summary_query_locked (EBookBackendSqliteDB *ebsdb, if (check_symbols[i].type == 1) { e_sexp_add_ifunction ( sexp, 0, check_symbols[i].name, - (ESExpIFunc *) check_symbols[i].func, ebsdb); + (ESExpIFunc) check_symbols[i].func, ebsdb); } else { e_sexp_add_function ( sexp, 0, check_symbols[i].name, @@ -3970,11 +3970,11 @@ func_regex (struct _ESExp *f, /* 'builtin' functions */ static struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; guint immediate :1; } symbols[] = { - { "and", (ESExpFunc *) func_and, 1}, - { "or", (ESExpFunc *) func_or, 1}, + { "and", (ESExpFunc) func_and, 1}, + { "or", (ESExpFunc) func_or, 1}, { "contains", func_contains, 0 }, { "is", func_is, 0 }, @@ -4003,7 +4003,7 @@ sexp_to_sql_query (EBookBackendSqliteDB *ebsdb, if (symbols[i].immediate) e_sexp_add_ifunction ( sexp, 0, symbols[i].name, - (ESExpIFunc *) symbols[i].func, &data); + (ESExpIFunc) symbols[i].func, &data); else e_sexp_add_function ( sexp, 0, symbols[i].name, diff --git a/src/addressbook/libedata-book/e-book-backend-summary.c b/src/addressbook/libedata-book/e-book-backend-summary.c index 79e46c3f6..0786dadb4 100644 --- a/src/addressbook/libedata-book/e-book-backend-summary.c +++ b/src/addressbook/libedata-book/e-book-backend-summary.c @@ -970,7 +970,7 @@ func_check (struct _ESExp *f, /* 'builtin' functions */ static const struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } check_symbols[] = { @@ -1011,7 +1011,7 @@ e_book_backend_summary_is_summary_query (EBookBackendSummary *summary, for (i = 0; i < G_N_ELEMENTS (check_symbols); i++) { if (check_symbols[i].type == 1) { e_sexp_add_ifunction (sexp, 0, check_symbols[i].name, - (ESExpIFunc *) check_symbols[i].func, &retval); + (ESExpIFunc) check_symbols[i].func, &retval); } else { e_sexp_add_function ( sexp, 0, check_symbols[i].name, @@ -1221,7 +1221,7 @@ func_beginswith (struct _ESExp *f, /* 'builtin' functions */ static const struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } symbols[] = { @@ -1259,7 +1259,7 @@ e_book_backend_summary_search (EBookBackendSummary *summary, for (i = 0; i < G_N_ELEMENTS (symbols); i++) { if (symbols[i].type == 1) { e_sexp_add_ifunction (sexp, 0, symbols[i].name, - (ESExpIFunc *) symbols[i].func, summary); + (ESExpIFunc) symbols[i].func, summary); } else { e_sexp_add_function ( sexp, 0, symbols[i].name, diff --git a/src/calendar/libedata-cal/e-cal-backend-sexp.c b/src/calendar/libedata-cal/e-cal-backend-sexp.c index 466d9d282..f479df3ac 100644 --- a/src/calendar/libedata-cal/e-cal-backend-sexp.c +++ b/src/calendar/libedata-cal/e-cal-backend-sexp.c @@ -1148,7 +1148,7 @@ e_cal_backend_sexp_init (ECalBackendSExp *sexp) /* 'builtin' functions */ static struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut * evaluation, or doesn't execute everything, * 0 otherwise */ @@ -1201,7 +1201,7 @@ e_cal_backend_sexp_new (const gchar *text) e_sexp_add_ifunction ( sexp->priv->search_sexp, 0, symbols[ii].name, - (ESExpIFunc *) symbols[ii].func, + (ESExpIFunc) symbols[ii].func, sexp->priv->search_context); } else { e_sexp_add_function ( diff --git a/src/libedataserver/CMakeLists.txt b/src/libedataserver/CMakeLists.txt index fc523ea91..e78601f49 100644 --- a/src/libedataserver/CMakeLists.txt +++ b/src/libedataserver/CMakeLists.txt @@ -291,7 +291,6 @@ set(gir_deps ${CMAKE_BINARY_DIR}/src/camel/Camel-${API_VERSION}.gir ) -gir_filter_out_sources(gir_sources e-sexp.h) gir_filter_out_sources(gir_sources -private.h) gir_add_introspection_simple( diff --git a/src/libedataserver/e-sexp.c b/src/libedataserver/e-sexp.c index 92304522b..1b7b8ae35 100644 --- a/src/libedataserver/e-sexp.c +++ b/src/libedataserver/e-sexp.c @@ -1463,22 +1463,22 @@ e_sexp_class_init (ESExpClass *class) /* 'builtin' functions */ static const struct { const gchar *name; - ESExpFunc *func; + ESExpFunc func; gint type; /* set to 1 if a function can perform shortcut evaluation, or doesn't execute everything, 0 otherwise */ } symbols[] = { - { "and", (ESExpFunc *) term_eval_and, 1 }, - { "or", (ESExpFunc *) term_eval_or, 1 }, - { "not", (ESExpFunc *) term_eval_not, 0 }, - { "<", (ESExpFunc *) term_eval_lt, 1 }, - { ">", (ESExpFunc *) term_eval_gt, 1 }, - { "=", (ESExpFunc *) term_eval_eq, 1 }, - { "+", (ESExpFunc *) term_eval_plus, 0 }, - { "-", (ESExpFunc *) term_eval_sub, 0 }, - { "cast-int", (ESExpFunc *) term_eval_castint, 0 }, - { "cast-string", (ESExpFunc *) term_eval_caststring, 0 }, - { "if", (ESExpFunc *) term_eval_if, 1 }, - { "begin", (ESExpFunc *) term_eval_begin, 1 }, + { "and", (ESExpFunc) term_eval_and, 1 }, + { "or", (ESExpFunc) term_eval_or, 1 }, + { "not", (ESExpFunc) term_eval_not, 0 }, + { "<", (ESExpFunc) term_eval_lt, 1 }, + { ">", (ESExpFunc) term_eval_gt, 1 }, + { "=", (ESExpFunc) term_eval_eq, 1 }, + { "+", (ESExpFunc) term_eval_plus, 0 }, + { "-", (ESExpFunc) term_eval_sub, 0 }, + { "cast-int", (ESExpFunc) term_eval_castint, 0 }, + { "cast-string", (ESExpFunc) term_eval_caststring, 0 }, + { "if", (ESExpFunc) term_eval_if, 1 }, + { "begin", (ESExpFunc) term_eval_begin, 1 }, }; static void @@ -1530,7 +1530,7 @@ e_sexp_init (ESExp *sexp) e_sexp_add_ifunction ( sexp, 0, symbols[i].name, - (ESExpIFunc *) symbols[i].func, + (ESExpIFunc) symbols[i].func, (gpointer) &symbols[i]); } else { e_sexp_add_function ( @@ -1552,7 +1552,7 @@ void e_sexp_add_function (ESExp *sexp, gint scope, const gchar *name, - ESExpFunc *func, + ESExpFunc func, gpointer data) { ESExpSymbol *s; @@ -1574,7 +1574,7 @@ void e_sexp_add_ifunction (ESExp *sexp, gint scope, const gchar *name, - ESExpIFunc *ifunc, + ESExpIFunc ifunc, gpointer data) { ESExpSymbol *s; diff --git a/src/libedataserver/e-sexp.h b/src/libedataserver/e-sexp.h index 90f0a0084..b70e6653f 100644 --- a/src/libedataserver/e-sexp.h +++ b/src/libedataserver/e-sexp.h @@ -66,11 +66,11 @@ struct _ESExpResult { time_t occuring_end; }; -typedef struct _ESExpResult *(ESExpFunc)(struct _ESExp *sexp, gint argc, +typedef struct _ESExpResult *(*ESExpFunc)(struct _ESExp *sexp, gint argc, struct _ESExpResult **argv, gpointer data); -typedef struct _ESExpResult *(ESExpIFunc)(struct _ESExp *sexp, gint argc, +typedef struct _ESExpResult *(*ESExpIFunc)(struct _ESExp *sexp, gint argc, struct _ESExpTerm **argv, gpointer data); @@ -89,8 +89,8 @@ struct _ESExpSymbol { gchar *name; gpointer data; union { - ESExpFunc *func; - ESExpIFunc *ifunc; + ESExpFunc func; + ESExpIFunc ifunc; } f; }; @@ -125,12 +125,12 @@ ESExp *e_sexp_new (void); void e_sexp_add_function (ESExp *sexp, gint scope, const gchar *name, - ESExpFunc *func, + ESExpFunc func, gpointer data); void e_sexp_add_ifunction (ESExp *sexp, gint scope, const gchar *name, - ESExpIFunc *func, + ESExpIFunc func, gpointer data); void e_sexp_add_variable (ESExp *sexp, gint scope, |