[evolution-data-server] CamelMimeFilter: Function signature cleanup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelMimeFilter: Function signature cleanup.
- Date: Fri, 6 Dec 2013 17:32:25 +0000 (UTC)
commit ed63961a86ce4b6e9c5476c6bce80c04e5fd3133
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Dec 6 12:25:41 2013 -0500
CamelMimeFilter: Function signature cleanup.
camel/camel-mime-filter.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
index 1b16706..1e0e91b 100644
--- a/camel/camel-mime-filter.c
+++ b/camel/camel-mime-filter.c
@@ -38,6 +38,15 @@ struct _CamelMimeFilterPrivate {
gsize inlen;
};
+/* Compatible with filter() and complete() methods. */
+typedef void (*FilterMethod) (CamelMimeFilter *filter,
+ const gchar *in,
+ gsize len,
+ gsize prespace,
+ gchar **out,
+ gsize *outlen,
+ gsize *outprespace);
+
#define PRE_HEAD (64)
#define BACK_HEAD (64)
@@ -132,12 +141,15 @@ checkmem (gpointer p)
}
#endif
-static void filter_run (CamelMimeFilter *f,
- const gchar *in, gsize len, gsize prespace,
- gchar **out, gsize *outlen, gsize *outprespace,
- void (*filterfunc)(CamelMimeFilter *f,
- const gchar *in, gsize len, gsize prespace,
- gchar **out, gsize *outlen, gsize *outprespace))
+static void
+filter_run (CamelMimeFilter *f,
+ const gchar *in,
+ gsize len,
+ gsize prespace,
+ gchar **out,
+ gsize *outlen,
+ gsize *outprespace,
+ FilterMethod method)
{
#ifdef MALLOC_CHECK
checkmem (f->outreal);
@@ -179,7 +191,7 @@ static void filter_run (CamelMimeFilter *f,
checkmem (f->backbuf);
#endif
- filterfunc (f, in, len, prespace, out, outlen, outprespace);
+ method (f, in, len, prespace, out, outlen, outprespace);
#ifdef MALLOC_CHECK
checkmem (f->outreal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]