From: Vsevolod Stakhov Date: Fri, 8 Nov 2013 16:42:04 +0000 (+0000) Subject: Replace gfind with gmatch. X-Git-Tag: 0.6.0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d1815a773b9543f79fc89b21191f0b1cf0e043;p=thirdparty%2Frspamd.git Replace gfind with gmatch. Reported by: Andrew Lewis --- diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 80855453d2..d99b0966be 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -17,7 +17,7 @@ function split(str, delim, maxNb) local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos - for part, pos in string.gfind(str, pat) do + for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 787f9fc941..2bc2cac42a 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -233,7 +233,7 @@ local function split(str, delim, maxNb) local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos - for part, pos in string.gfind(str, pat) do + for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 65524745c9..bda978cb72 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -14,7 +14,7 @@ local function split(str, delim, maxNb) local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos - for part, pos in string.gfind(str, pat) do + for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos