summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-12-06 12:25:41 -0500
committerMatthew Barnes <mbarnes@redhat.com>2013-12-06 12:34:24 -0500
commit926fe5542c2995f7aa3e4df6c1a980a171981896 (patch)
tree12d0257ac38b94ef90321c35b92c0e70fe00f9d4
parent71110bbc9f46f731341464ec8403c27fc87912b8 (diff)
downloadevolution-data-server-926fe5542c2995f7aa3e4df6c1a980a171981896.tar.gz
CamelMimeFilter: Function signature cleanup.
(cherry picked from commit ed63961a86ce4b6e9c5476c6bce80c04e5fd3133)
-rw-r--r--camel/camel-mime-filter.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
index a4bea132e..89c3a1cfd 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);