summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-02 18:22:14 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-02 18:22:14 +0300
commit2fdf31355f00996dac96794b3b5d825fe7a53aef (patch)
treec90294db4f1d122ba6dcfcdfaef8d4b528128648 /src/lua
parentf678526b2089826fba0299c88b9258bc48f748c4 (diff)
downloadrspamd-2fdf31355f00996dac96794b3b5d825fe7a53aef.tar.gz
rspamd-2fdf31355f00996dac96794b3b5d825fe7a53aef.zip
Compatibility with old glib versions.
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_regexp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index ba9a4dabc..0f443955e 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -160,6 +160,7 @@ lua_regexp_match (lua_State *L)
if (re) {
data = luaL_checkstring (L, 2);
if (data) {
+#if GLIB_MINOR_VERSION >= 26
if ((g_regex_get_compile_flags (re) & G_REGEX_RAW) == 0) {
/* Validate input */
if (!g_utf8_validate (data, -1, NULL)) {
@@ -167,6 +168,7 @@ lua_regexp_match (lua_State *L)
return 1;
}
}
+#endif
if (g_regex_match_full (re, data, -1, 0, 0, &mi, NULL)) {
matches = g_match_info_fetch_all (mi);
lua_newtable (L);