From 7f27738df23b2098214d956e6b41149c1a158404 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 14 Jun 2013 10:34:17 +0200 Subject: [PATCH] More win32 fixes --- src/matcher.c | 6 ++++++ src/matcher.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/matcher.c b/src/matcher.c index 1b8e4c9dd..8c1fd1157 100644 --- a/src/matcher.c +++ b/src/matcher.c @@ -313,7 +313,9 @@ MatcherProp *matcherprop_new(gint criteria, const gchar *header, prop->expr = expr != NULL ? g_strdup(expr) : NULL; prop->matchtype = matchtype; +#ifndef G_OS_WIN32 prop->preg = NULL; +#endif prop->value = value; prop->error = 0; @@ -330,10 +332,12 @@ void matcherprop_free(MatcherProp *prop) { g_free(prop->expr); g_free(prop->header); +#ifndef G_OS_WIN32 if (prop->preg != NULL) { regfree(prop->preg); g_free(prop->preg); } +#endif g_free(prop); } @@ -353,7 +357,9 @@ MatcherProp *matcherprop_copy(const MatcherProp *src) prop->expr = src->expr ? g_strdup(src->expr) : NULL; prop->matchtype = src->matchtype; +#ifndef G_OS_WIN32 prop->preg = NULL; /* will be re-evaluated */ +#endif prop->value = src->value; prop->error = src->error; return prop; diff --git a/src/matcher.h b/src/matcher.h index 9a6c89816..62d5352e8 100644 --- a/src/matcher.h +++ b/src/matcher.h @@ -36,7 +36,9 @@ struct _MatcherProp { gchar *header; gchar *expr; int value; +#ifndef G_OS_WIN32 regex_t *preg; +#endif int error; gboolean result; gboolean done; -- 2.25.1