[evolution-data-server/gnome-3-10] CamelMimeFilter: Function signature cleanup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-10] CamelMimeFilter: Function signature cleanup.
- Date: Fri, 6 Dec 2013 17:33:24 +0000 (UTC)
commit 926fe5542c2995f7aa3e4df6c1a980a171981896
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Dec 6 12:25:41 2013 -0500
CamelMimeFilter: Function signature cleanup.
(cherry picked from commit ed63961a86ce4b6e9c5476c6bce80c04e5fd3133)
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 a4bea13..89c3a1c 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]